File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # This workflows creates an jira issue for the respective configured account
1+ # This workflow is triggered by github issue and creates a jira ticket in the respective configured account
22#
33name : issue_notify
44on :
55 issues :
66 types : [opened]
77 workflow_dispatch :
88jobs :
9- jira_login :
9+ jira_job :
1010 runs-on : ubuntu-latest
1111 steps :
1212 - name : Jira Login
1919 id : jira_ticket
2020 uses : atlassian/gajira-create@v2.0.1
2121 with :
22- project : GIT
22+ project : ${{secrets.JIRA_PROJECT_KEY}}
2323 issuetype : Bug
2424 summary : ' [ns1-terraform] ${{github.event.issue.title}}'
25- description : ${{github.event.issue.body}} see more ${{github.event.issue.html_url}}
25+ description : ${{github.event.issue.body}} see more at ${{github.event.issue.html_url}}
Original file line number Diff line number Diff line change 1+ # This workflow is triggered by pull request and creates an jira ticket if the ticket does not exist in jira
2+ #
3+ name : pr_notify
4+ on :
5+ pull_request :
6+ branches : [master]
7+ jobs :
8+ jira_job :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Jira Login
12+ uses : atlassian/gajira-login@v2.0.0
13+ env :
14+ JIRA_BASE_URL : ${{ secrets.JIRA_BASE_URL }}
15+ JIRA_USER_EMAIL : ${{ secrets.JIRA_USER_EMAIL }}
16+ JIRA_API_TOKEN : ${{ secrets.JIRA_API_TOKEN }}
17+ # try to find jira key in the PR title
18+ - name : Find jirakey in title
19+ id : jira_founded_ticket
20+ uses : atlassian/gajira-find-issue-key@master
21+ continue-on-error : true
22+ with :
23+ string : ${{ github.event.pull_request.title }}
24+ # if there is no ticket associated then create a new one
25+ - name : Jira Create issue
26+ id : jira_ticket
27+ if : ${{!steps.jira_founded_ticket.outputs.issue}}
28+ uses : atlassian/gajira-create@v2.0.1
29+ with :
30+ project : ${{secrets.JIRA_PROJECT_KEY}}
31+ issuetype : Task
32+ summary : ${{github.event.pull_request.title}}
33+ description : ${{github.event.pull_request.body}} see more at ${{github.event.pull_request.html_url}}
You can’t perform that action at this time.
0 commit comments