File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Close Jira issue
2+ on :
3+ issues :
4+ types :
5+ - closed
6+
7+ jobs :
8+ close-issue :
9+ name : Close Jira issue
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Login to Jira
14+ uses : atlassian/gajira-login@v3
15+ env :
16+ JIRA_BASE_URL : ${{ secrets.JIRA_BASE_URL }}
17+ JIRA_API_TOKEN : ${{ secrets.JIRA_API_TOKEN }}
18+ JIRA_USER_EMAIL : ${{ secrets.JIRA_USER_EMAIL }}
19+
20+ - name : Extract Jira issue key from GitHub issue title
21+ id : extract-key
22+ run : |
23+ ISSUE_TITLE="${{ github.event.issue.title }}"
24+ JIRA_KEY=$(echo "$ISSUE_TITLE" | grep -oE '[A-Z]+-[0-9]+')
25+ echo "JIRA_KEY=$JIRA_KEY" >> $GITHUB_ENV
26+
27+ - name : Close Jira issue
28+ if : env.JIRA_KEY != ''
29+ uses : atlassian/gajira-transition@v3
30+ with :
31+ issue : ${{ env.JIRA_KEY }}
You can’t perform that action at this time.
0 commit comments