Skip to content

Instantly share code, notes, and snippets.

@engelin
Created January 30, 2023 17:47
Show Gist options
  • Save engelin/37dccbf43be4dff402c6a6b38ef956ad to your computer and use it in GitHub Desktop.
Save engelin/37dccbf43be4dff402c6a6b38ef956ad to your computer and use it in GitHub Desktop.
Jira & github integration backup
name: Add a new comment
on:
issue_comment:
types:
- created
- edited
jobs:
add-new-comment:
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: Print a new comment
run: |
export TICKET=$(echo ${{ github.event.issue.title }} | awk '/A3MS/ { print $1 }')
echo "TICKET=$TICKET" >> $GITHUB_ENV
- name: Comment to JIRA
uses: atlassian/gajira-comment@master
with:
issue: ${{ env.TICKET }}
comment: ${{ github.event.comment.body }} by git_webhook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment