In VSTS, can I specify the new state of a linked work item when a pull request is approved?

前端 未结 2 996
日久生厌
日久生厌 2021-01-22 05:12

Once the PR is approved I want to automatically advance the state of the linked work item, but I don\'t want it to be marked as \"complete\". Instead I\'d like the work item sta

相关标签:
2条回答
  • 2021-01-22 05:25

    You can try to use

    • Add a rule to a work item type https://docs.microsoft.com/en-us/azure/devops/organizations/settings/work/custom-rules?view=azure-devops
    • Create service hook and cosume it later using azure function or logic app https://docs.microsoft.com/en-us/azure/devops/service-hooks/overview?view=azure-devops
    0 讨论(0)
  • 2021-01-22 05:38

    For now, work item state can only be changed as complete when merging a PR.

    And there has an user voice Customize Work Item State after PR is closed which suggests this feature, you can vote and follow up.

    The work around for now is changing the linked work item(s) through CI build (after completing the PR). Detail work flow as follow:

    • Add a CI build to trigger automatically after the target branch has new commit(s). And add a PowerShell task to update the linked work items state by REST API.
    • When PR is completed, CI build will be triggered automcally. And the linked work items state will be updated.
    0 讨论(0)
提交回复
热议问题