-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (55 loc) · 2.05 KB
/
jira-transition.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
name: Transition JIRA ticket
on:
issues:
types:
- labeled
jobs:
transition-jira-ticket:
runs-on: ubuntu-latest
steps:
- id: use-jira
# yamllint disable rule:line-length
run: echo '::set-output name=result::$(test -n ${{ secrets.JIRA_BASE_URL }} && echo 1)'
- uses: atlassian/gajira-login@master
if: steps.use-jira.outputs.result
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
- uses: atlassian/gajira-find-issue-key@master
if: steps.use-jira.outputs.result
id: find
with:
string: ${{ github.event.issue.title }}
from: ''
- name: Mark as TODO
if: steps.use-jira.outputs.result && steps.find.outputs.issue && github.event.label.name == 'todo'
uses: atlassian/gajira-transition@master
with:
issue: "${{ steps.find.outputs.issue }}"
transition: 'To Do'
- name: Mark as in-progress
if: steps.use-jira.outputs.result && steps.find.outputs.issue && github.event.label.name == 'progress'
uses: atlassian/gajira-transition@master
with:
issue: "${{ steps.find.outputs.issue }}"
transition: 'In Progress'
- name: Mark as in-review
if: steps.use-jira.outputs.result && steps.find.outputs.issue && github.event.label.name == 'review'
uses: atlassian/gajira-transition@master
with:
issue: "${{ steps.find.outputs.issue }}"
transition: 'In Review'
- name: Mark as blocked
if: steps.use-jira.outputs.result && steps.find.outputs.issue && github.event.label.name == 'blocked'
uses: atlassian/gajira-transition@master
with:
issue: "${{ steps.find.outputs.issue }}"
transition: 'Blocked'
- name: Mark as done
if: steps.use-jira.outputs.result && steps.find.outputs.issue && github.event.label.name == 'done'
uses: atlassian/gajira-transition@master
with:
issue: "${{ steps.find.outputs.issue }}"
transition: "Done"