|
1 | | -name: Sync issue to Azure DevOps work item |
2 | | - |
3 | | -on: |
4 | | - issues: |
5 | | - # Omit "labeled" and "unlabeled" to work around https://github.com/danhellem/github-actions-issue-to-work-item/issues/70 |
6 | | - types: |
7 | | - [opened, edited, deleted, closed, reopened, assigned] |
8 | | - issue_comment: |
9 | | - types: [created, edited, deleted] |
10 | | - |
11 | | -jobs: |
12 | | - alert: |
13 | | - if: ${{ !github.event.issue.pull_request && github.event.issue.title != 'Dependency Dashboard' }} |
14 | | - runs-on: ubuntu-latest |
15 | | - steps: |
16 | | - - name: Choose work item type |
17 | | - id: choose_work_item_type |
18 | | - run: | |
19 | | - if [ "${{ contains(github.event.issue.labels.*.name, 'enhancement') || contains(github.event.issue.labels.*.name, 'user story') }}" == "true" ]; then |
20 | | - echo "work_item_type=User Story" >> $GITHUB_OUTPUT |
21 | | - elif [ "${{ contains(github.event.issue.labels.*.name, 'tech debt') }}" == "true" ]; then |
22 | | - echo "work_item_type=Technical Debt" >> $GITHUB_OUTPUT |
23 | | - else |
24 | | - echo "work_item_type=Bug" >> $GITHUB_OUTPUT |
25 | | - fi |
26 | | - - uses: danhellem/[email protected] |
27 | | - env: |
28 | | - ado_token: "${{ secrets.AZDO_WORK_ITEM_TOKEN }}" |
29 | | - github_token: "${{ secrets.GH_REPO_TOKEN }}" |
30 | | - ado_organization: "ni" |
31 | | - ado_project: "DevCentral" |
32 | | - ado_area_path: "DevCentral\\Product RnD\\Platform HW and SW\\Core SW and Drivers\\Platform HW and Drivers\\Drivers\\Mars" |
33 | | - ado_wit: "${{ steps.choose_work_item_type.outputs.work_item_type }}" |
34 | | - ado_new_state: "New" |
35 | | - ado_active_state: "Active" |
36 | | - ado_close_state: "Closed" |
37 | | - ado_bypassrules: true |
38 | | - log_level: 100 |
| 1 | +name: Sync issue to Azure DevOps work item |
| 2 | + |
| 3 | +on: |
| 4 | + issues: |
| 5 | + # Omit "labeled" and "unlabeled" to work around https://github.com/danhellem/github-actions-issue-to-work-item/issues/70 |
| 6 | + types: |
| 7 | + [opened, edited, deleted, closed, reopened, assigned] |
| 8 | + issue_comment: |
| 9 | + types: [created, edited, deleted] |
| 10 | + |
| 11 | +jobs: |
| 12 | + alert: |
| 13 | + if: ${{ !github.event.issue.pull_request && github.event.issue.title != 'Dependency Dashboard' }} |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - name: Choose work item type |
| 17 | + id: choose_work_item_type |
| 18 | + run: | |
| 19 | + if [ "${{ contains(github.event.issue.labels.*.name, 'enhancement') || contains(github.event.issue.labels.*.name, 'user story') }}" == "true" ]; then |
| 20 | + echo "work_item_type=User Story" >> $GITHUB_OUTPUT |
| 21 | + elif [ "${{ contains(github.event.issue.labels.*.name, 'tech debt') }}" == "true" ]; then |
| 22 | + echo "work_item_type=Technical Debt" >> $GITHUB_OUTPUT |
| 23 | + else |
| 24 | + echo "work_item_type=Bug" >> $GITHUB_OUTPUT |
| 25 | + fi |
| 26 | + - uses: danhellem/[email protected] |
| 27 | + env: |
| 28 | + ado_token: "${{ secrets.AZDO_WORK_ITEM_TOKEN }}" |
| 29 | + github_token: "${{ secrets.GH_REPO_TOKEN }}" |
| 30 | + ado_organization: "ni" |
| 31 | + ado_project: "DevCentral" |
| 32 | + ado_area_path: "DevCentral\\Product RnD\\Platform HW and SW\\Core SW and Drivers\\Platform HW and Drivers\\Drivers\\Mars" |
| 33 | + ado_wit: "${{ steps.choose_work_item_type.outputs.work_item_type }}" |
| 34 | + ado_new_state: "New" |
| 35 | + ado_active_state: "Active" |
| 36 | + ado_close_state: "Closed" |
| 37 | + ado_bypassrules: true |
| 38 | + log_level: 100 |
0 commit comments