Skip to content

Instantly share code, notes, and snippets.

@bnguyensn
Created March 30, 2021 15:08
Show Gist options
  • Save bnguyensn/7cc77bf126ddb9c4c97a84f8ead176f1 to your computer and use it in GitHub Desktop.
Save bnguyensn/7cc77bf126ddb9c4c97a84f8ead176f1 to your computer and use it in GitHub Desktop.
DH-99 example GitHub action
# This job is right below "publish_results"
comment_on_jira:
name: "Comment on Jira"
if: github.event.action == 'opened'
needs: [linting, unit_test, end_to_end_test, deploy_pr_frontend, deploy_storybook, plan_staging, plan_prod]
runs-on: ubuntu-latest
steps:
- name: "Login to JIRA"
uses: atlassian/gajira-login@master
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
- name: "Find issue key from branch name"
id: find-jira-issue
uses: atlassian/gajira-find-issue-key@master
with:
from: branch
- name: "Comment on issue with link to Storybook PR deployment"
uses: atlassian/gajira-comment@master
with:
issue: ${{ steps.find-jira-issue.outputs.issue }}
comment: "Storybook link: ${{ needs.deploy_storybook.outputs.url }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment