@@ -2,21 +2,34 @@ name: Sync issue to Azure DevOps work item
22
33on :
44 issues :
5+ # Omit "labeled" and "unlabeled" to work around https://github.com/danhellem/github-actions-issue-to-work-item/issues/70
56 types :
6- [opened, edited, deleted, closed, reopened, labeled, unlabeled, assigned]
7+ [opened, edited, deleted, closed, reopened, assigned]
8+ issue_comment :
9+ types : [created, edited, deleted]
710
811jobs :
912 alert :
1013 runs-on : ubuntu-latest
1114 steps :
15+ - name : Choose work item type
16+ id : choose_work_item_type
17+ run : |
18+ if [ "${{ contains(github.event.issue.labels.*.name, 'enhancement') || contains(github.event.issue.labels.*.name, 'user story') }}" == "true" ]; then
19+ echo "work_item_type=User Story" >> $GITHUB_OUTPUT
20+ elif [ "${{ contains(github.event.issue.labels.*.name, 'tech debt') }}" == "true" ]; then
21+ echo "work_item_type=Technical Debt" >> $GITHUB_OUTPUT
22+ else
23+ echo "work_item_type=Bug" >> $GITHUB_OUTPUT
24+ fi
1225 - uses : danhellem/github-actions-issue-to-work-item@v2.1
1326 env :
14- ado_token : " ${{ secrets.AZDO_Work_Item_Token }}"
27+ ado_token : " ${{ secrets.AZDO_WORK_ITEM_TOKEN }}"
1528 github_token : " ${{ secrets.GH_REPO_TOKEN }}"
1629 ado_organization : " ni"
1730 ado_project : " DevCentral"
1831 ado_area_path : " DevCentral\\ Product RnD\\ PlatformSW\\ Test System SW\\ CBS\\ Test Automation Frameworks"
19- ado_wit : " Bug "
32+ ado_wit : " ${{ steps.choose_work_item_type.outputs.work_item_type }} "
2033 ado_new_state : " New"
2134 ado_active_state : " Active"
2235 ado_close_state : " Closed"
0 commit comments