Skip to content

Commit b36f24c

Browse files
committed
[skip changelog] Add workflow to mirror issue on Jira to ease grooming
1 parent 983e523 commit b36f24c

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/jira-issue.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: "Mirror new issue to Jira for grooming"
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
create-issue:
9+
runs-on: ubuntu-latest
10+
11+
env:
12+
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
13+
14+
steps:
15+
- name: Installs Jira CLI
16+
uses: atlassian/gajira-cli@master
17+
with:
18+
version: 1.0.23
19+
20+
- name: Create issue
21+
run: |
22+
jira create \
23+
--noedit \
24+
-e ${{ secrets.JIRA_BASE_URL }} \
25+
-u ${{ secrets.JIRA_USER_EMAIL }} \
26+
-p ATL -i Task \
27+
-o summary="${{ github.event.issues.issue.title }}" \
28+
-o description="${{ github.event.issues.issue.body }}\n${{ github.event.issues.issue.html_url }}" \
29+
>> output
30+
31+
- name: Set label on Jira issue
32+
run: |
33+
jira label add
34+
$(cat output | awk '{split($0,a," "); print a[2]}')
35+
grooming arduino-cli
36+
37+
- name: Set label on Github issue
38+
- uses: actions/github-script@v2
39+
with:
40+
github-token: ${{ secrets.GITHUB_TOKEN }}
41+
script: |
42+
github.issues.addLabels({
43+
issue_number: context.issue.number,
44+
owner: context.repo.owner,
45+
repo: context.repo.repo,
46+
labels: ['tracked']
47+
})

0 commit comments

Comments
 (0)