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.
Domain to use for Azure DevOps. Defaults to dev.azure.com
The organisation within Azure DevOps that the work items are in.
The project with Azure DevOps that the work items are in.
An Azure DevOps Personal Access Token. The token requires access to read and update work items.
The state that work items will be set to when linked.
# 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"