Skip to content

Commit a578c04

Browse files
mjohanse-emrMichael Johansen
andauthored
Add the sync github issue to azdo work item workflow. (#15)
Signed-off-by: Michael Johansen <[email protected]> Co-authored-by: Michael Johansen <[email protected]>
1 parent 4f9ab73 commit a578c04

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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/github-actions-issue-to-work-item@45eb3b46e684f2acd2954f02ef70350c835ee4bb # v2.4
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\\SW New Invest and Tech\\ETW\\Python CodeGen"
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

Comments
 (0)