Skip to content

Commit ecec6fe

Browse files
chore: Include extra data in call to JIRA webhook (#1665)
Whenever a release candidate deployment happens from this repository, a GitHub Actions workflow attempts to process the tickets it contains, and consumes a Jira webhook that triggers an automation to move those tickets into the "To Be Tested" column. I recently updated that automation to also leave a comment on the ticket when the deployment happens This PR adds more details to the webhook call so that the comment may include more details about the deployment. These details are: - The release candidate tag - The repository URL
1 parent 122328e commit ecec6fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/update-jira-tickets.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ jobs:
103103
echo "tickets=${jiraTickets}" >> $GITHUB_OUTPUT
104104
105105
- name: Periodically ping Jenkins for current tag build status
106+
env:
107+
REPO_URL: "${{ github.server_url }}/${{ github.repository }}"
106108
run: |
107109
repoName=${GITHUB_REPOSITORY##*/}
108110
currentTag="${{ steps.get-tag.outputs.tag }}"
@@ -124,7 +126,7 @@ jobs:
124126
if [[ "$result" == "SUCCESS" ]]; then
125127
echo "Build successful! Submitting ticket numbers to Jira"
126128
tickets="${{ steps.jira-tickets.outputs.tickets }}"
127-
json="{ \"issues\": $(echo "${tickets}" | jq -R -s -c 'split(" ")[:-1]') }"
129+
json="{ \"issues\": $(echo "${tickets}" | jq -R -s -c 'split(" ")[:-1]'), \"data\": { \"tag\": \"${currentTag}\", \"repository\": \"${REPO_URL}\" } }"
128130
curl -X POST -H 'Content-Type: application/json' --url "${JIRA_WEBHOOK_URL}" --data "$json"
129131
break
130132
elif [[ "$result" != "null" ]]; then

0 commit comments

Comments
 (0)