Skip to content

Small Github Action to update the status of a Work Item that is linked to a PR using AB# with the work item id.

Notifications You must be signed in to change notification settings

Magentah/az-update-linked-work-item

Repository files navigation

What is this?

This is a simple Github Action that will update the state for a work item in Azure DevOps to a configured state when the work item is linked to a Pull Request, either by being added to the Pull Request description or in a comment.

Inputs

ado_domain

Domain to use for Azure DevOps. Defaults to dev.azure.com

ado_org

The organisation within Azure DevOps that the work items are in.

ado_project

The project with Azure DevOps that the work items are in.

ado_pat

An Azure DevOps Personal Access Token. The token requires access to read and update work items.

in_review_state

The state that work items will be set to when linked.

Example Usage

# Controls when the workflow will run
on:
  pull_request:
    types: [ opened, reopened, edited ]
  pull_request_review_comment:
    types: [ created ]
  issue_comment:
    types: [ created ]

jobs:
  update-ado-state:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: magentah/[email protected]
        with:
          ado_domain: "dev.azure.com"
          ado_org: "my-ado-organization"
          ado_project: "My ADO Project"
          ado_pat: ${{ secrets.ADO_PAT }}
          reviewed_state: "In Review"

About

Small Github Action to update the status of a Work Item that is linked to a PR using AB# with the work item id.

Resources

Stars

Watchers

Forks

Packages

No packages published