-
Notifications
You must be signed in to change notification settings - Fork 0
128 lines (120 loc) · 4.62 KB
/
assigned-issue-in-progress.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Project automations (organization)
on:
issues:
types: [opened, reopened, assigned, unassigned]
pull_request:
types:
[
opened,
closed,
reopened,
ready_for_review,
review_requested,
converted_to_draft,
review_request_removed,
]
env:
gh_project_token: ${{ secrets.PAC_TOKEN }}
project_id: 1
gh_organization: sound-laboratories
status_todo: "Backlog"
status_in_progress: "In Progress"
status_in_review: "In Review"
# custom_field_values: '[{\"name\": \"Priority\",\"type\": \"text\",\"value\": \"uuid1\"},{\"name\": \"Number\",\"type\": \"number\",\"value\": \"100\"},{\"name\": \"Date\",\"type\": \"date\",\"value\": \"2022-01-28T20:02:27.306+01:00\"},{\"name\": \"Single Select\",\"type\": \"single_select\",\"value\": \"Option 1\"},{\"name\": \"Iteration\",\"type\": \"iteration\",\"value\": \"Iteration 1\"}]'
jobs:
issue_opened_or_reopened:
name: issue_opened_or_reopened
runs-on: ubuntu-latest
if: github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'reopened')
steps:
- name: "Move issue to ${{ env.status_todo }}"
uses: leonsteinhaeuser/[email protected]
env:
DEBUG_LOG: "true"
with:
gh_token: ${{ env.gh_project_token }}
organization: ${{ env.gh_organization }}
project_id: ${{ env.project_id }}
resource_node_id: ${{ github.event.issue.node_id }}
status_value: ${{ env.status_todo }}
issue_assigned:
name: issue_assinged
runs-on: ubuntu-latest
if: |
github.event_name == 'issues' &&
github.event.action == 'assigned'
steps:
- name: "Move issue to ${{ env.status_in_progress }}"
uses: leonsteinhaeuser/[email protected]
env:
DEBUG_LOG: "true"
with:
gh_token: ${{ env.gh_project_token }}
organization: ${{ env.gh_organization }}
project_id: ${{ env.project_id }}
resource_node_id: ${{ github.event.issue.node_id }}
status_value: ${{ env.status_in_progress }}
issue_unassigned:
name: issue_unassigned
runs-on: ubuntu-latest
if: |
github.event_name == 'issues' &&
github.event.action == 'unassigned'
steps:
- name: "Move issue to ${{ env.status_todo }}"
uses: leonsteinhaeuser/[email protected]
env:
DEBUG_LOG: "true"
with:
gh_token: ${{ env.gh_project_token }}
organization: ${{ env.gh_organization }}
project_id: ${{ env.project_id }}
resource_node_id: ${{ github.event.issue.node_id }}
status_value: ${{ env.status_todo }}
pr_request_review:
runs-on: ubuntu-latest
if: |
github.event_name == 'pull_request' &&
(github.event.action == 'ready_for_review' || github.event.action == 'review_requested')
steps:
- name: "Move issue to ${{ env.status_in_review }}"
uses: leonsteinhaeuser/[email protected]
env:
DEBUG_LOG: "true"
with:
gh_token: ${{ env.gh_project_token }}
organization: ${{ env.gh_organization }}
project_id: ${{ env.project_id }}
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: ${{ env.status_in_review }}
pr_converted_draft:
runs-on: ubuntu-latest
if: |
github.event_name == 'pull_request' &&
(github.event.action == 'converted_to_draft' || github.event.action == 'review_request_removed')
steps:
- name: "Move issue to ${{ env.status_in_progress }}"
uses: leonsteinhaeuser/[email protected]
env:
DEBUG_LOG: "true"
with:
gh_token: ${{ env.gh_project_token }}
organization: ${{ env.gh_organization }}
project_id: ${{ env.project_id }}
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: ${{ env.status_in_progress }}
pr_opened_or_reopened:
name: pr_opened_or_reopened
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened')
steps:
- name: "Move PR to ${{ env.status_in_progress }}"
uses: leonsteinhaeuser/[email protected]
env:
DEBUG_LOG: "true"
with:
gh_token: ${{ env.gh_project_token }}
organization: ${{ env.gh_organization }}
project_id: ${{ env.project_id }}
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: ${{ env.status_in_progress }}