Skip to content

Commit

Permalink
add automated comment on issue with link to story
Browse files Browse the repository at this point in the history
  • Loading branch information
“Dafydd committed Oct 31, 2024
1 parent f51bb37 commit 5998757
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/jira.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,15 @@ jobs:
ISSUE_BODY: "${{ github.event.issue.body }}"
GITHUB_ISSUE_URL: "https://github.com/${{ github.repository }}/issues/${{ github.event.issue.number }}"
GITHUB_ASSIGNEE_USERNAME: "${{ github.event.issue.assignee.login }}"
run: .github/workflows/create_jira_tickets.sh
run: |
.github/workflows/create_jira_tickets.sh
STORY_KEY=$(jq -r '.key' response.json)
echo "STORY_KEY=$STORY_KEY" >> $GITHUB_ENV
- name: Comment on GitHub Issue
run: |
# Comment on the GitHub issue with the Jira story key
COMMENT_BODY="This issue has been linked to Jira story [$STORY_KEY](https://cworthy.atlassian.net/browse/$STORY_KEY)."
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
-d "{\"body\": \"$COMMENT_BODY\"}" \
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments"

0 comments on commit 5998757

Please sign in to comment.