File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 JIRA_BASE_URL :
1010 required : true
1111 description : ' The base URL of your JIRA instance'
12- JIRA_BASIC_AUTH :
12+ JIRA_USER_EMAIL :
1313 required : true
14- description : ' The base64-encoded username:password for your JIRA instance'
14+ description : ' The email address for your JIRA account'
15+ JIRA_API_TOKEN :
16+ required : true
17+ description : ' The API token for your JIRA account'
18+
1519
1620jobs :
1721 add_jira_summary :
2024 env :
2125 JIRA_PATTERN : " ([A-Z]+)[-# ]*([0-9]+)"
2226 JIRA_BASE_URL : ${{ secrets.JIRA_BASE_URL }}
23- JIRA_BASIC_AUTH : ${{ secrets.JIRA_BASIC_AUTH }}
27+ JIRA_USER_EMAIL : ${{ secrets.JIRA_USER_EMAIL }}
28+ JIRA_API_TOKEN : ${{ secrets.JIRA_API_TOKEN }}
29+
2430 steps :
2531
2632 - name : Find JIRA issue key from branch
3945 id : jira_summary_from_branch
4046 run : >
4147 curl -sS -X GET
42- -H "Authorization: Basic $JIRA_BASIC_AUTH "
48+ -u "${JIRA_USER_EMAIL}:${JIRA_API_TOKEN} "
4349 -H "Content-Type: application/json"
4450 "$JIRA_BASE_URL/rest/api/2/issue/${{ steps.jira_key_from_branch.outputs.issue_key }}"
4551 | echo "summary=$(jq -r '.fields.summary // empty' | xargs)" >> $GITHUB_OUTPUT
6167 id : jira_summary_from_title
6268 run : >
6369 curl -sS -X GET
64- -H "Authorization: Basic $JIRA_BASIC_AUTH "
70+ -u "${JIRA_USER_EMAIL}:${JIRA_API_TOKEN} "
6571 -H "Content-Type: application/json"
6672 "$JIRA_BASE_URL/rest/api/2/issue/${{ steps.jira_key_from_title.outputs.issue_key }}"
6773 | echo "summary=$(jq -r '.fields.summary // empty' | xargs)" >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments