forked from iden3/circom
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (52 loc) · 1.76 KB
/
jira-to-merge-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
56
57
58
59
60
on:
pull_request_review:
types: [submitted]
branches: [ llvm ]
name: Transition Issue to "To Merge" State
jobs:
transition-issue:
name: Transition Issue to In Review
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
submodules: recursive
persist-credentials: false
- name: Login
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 }}
- uses: luisrjaeger/[email protected]
id: approved
with:
# defaults to one approval, leaving it this here in case we
# want to increase it in the future.
# approvals: 2
check_changes_requested: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Find Issue Key
id: find
uses: atlassian/gajira-find-issue-key@v3
continue-on-error: true
with:
string: ${{ github.event.pull_request.head.ref }}
# This progress to Verify. Eventually, it should be the last step of this workflow.
- name: Transition issue 1
if: ${{ steps.approved.outputs.approved == 'true' }}
uses: atlassian/gajira-transition@v3
continue-on-error: true
with:
issue: ${{ steps.find.outputs.issue }}
transition: Approved by reviewer
# Our imaginary Q/A team approves. This should be moved to a different workflow.
- name: Transition issue 2
if: ${{ steps.approved.outputs.approved == 'true' }}
uses: atlassian/gajira-transition@v3
continue-on-error: true
with:
issue: ${{ steps.find.outputs.issue }}
transition: Q/A team approves