-
Notifications
You must be signed in to change notification settings - Fork 284
291 lines (289 loc) · 12.5 KB
/
Copy pathupdate_project_labels.yaml
File metadata and controls
291 lines (289 loc) · 12.5 KB
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
name: Update Project Labels
on:
pull_request_target:
types:
- opened
- reopened
- labeled
- unlabeled
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
baseline-labels:
name: Baseline labels
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Lack of baseline labels
if: |
!contains(github.event.pull_request.labels.*.name, 'No Baseline Change') &&
!contains(github.event.pull_request.labels.*.name, 'Baseline Updates') &&
!contains(github.event.pull_request.labels.*.name, 'New Baselines')
uses: github/update-project-action@af4f6083118f5080c89828b421ef598d1906fb60 #v4
with:
github_token: ${{ secrets.PR_PROJECT_TOKEN }}
organization: ufs-community
project_number: 70
content_id: ${{ github.event.pull_request.node_id }}
operation: update
field: 'Baseline Changes'
value: 'Unknown'
- name: Contradictory labels
if: |
contains(github.event.pull_request.labels.*.name, 'No Baseline Change') &&
(contains(github.event.pull_request.labels.*.name, 'Baseline Updates') ||
contains(github.event.pull_request.labels.*.name, 'New Baselines'))
uses: github/update-project-action@af4f6083118f5080c89828b421ef598d1906fb60 #v4
with:
github_token: ${{ secrets.PR_PROJECT_TOKEN }}
organization: ufs-community
project_number: 70
content_id: ${{ github.event.pull_request.node_id }}
operation: update
field: 'Baseline Changes'
value: 'Unknown'
- name: Baseline changes labels
if: |
!contains(github.event.pull_request.labels.*.name, 'No Baseline Change') &&
( contains(github.event.pull_request.labels.*.name, 'Baseline Updates') ||
contains(github.event.pull_request.labels.*.name, 'New Baselines') )
uses: github/update-project-action@af4f6083118f5080c89828b421ef598d1906fb60 #v4
with:
github_token: ${{ secrets.PR_PROJECT_TOKEN }}
organization: ufs-community
project_number: 70
content_id: ${{ github.event.pull_request.node_id }}
operation: update
field: 'Baseline Changes'
value: 'Yes'
- name: No baseline changes label
if: |
contains(github.event.pull_request.labels.*.name, 'No Baseline Change') &&
!contains(github.event.pull_request.labels.*.name, 'Baseline Updates') &&
!contains(github.event.pull_request.labels.*.name, 'New Baselines')
uses: github/update-project-action@af4f6083118f5080c89828b421ef598d1906fb60 #v4
with:
github_token: ${{ secrets.PR_PROJECT_TOKEN }}
organization: ufs-community
project_number: 70
content_id: ${{ github.event.pull_request.node_id }}
operation: update
field: 'Baseline Changes'
value: 'No'
data-labels:
name: Input data
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Additions to current input-data directory required
if: |
contains(github.event.pull_request.labels.*.name, 'Adds Input Data') &&
!contains(github.event.pull_request.labels.*.name, 'Changes Existing Input Data')
uses: github/update-project-action@af4f6083118f5080c89828b421ef598d1906fb60 #v4
with:
github_token: ${{ secrets.PR_PROJECT_TOKEN }}
organization: ufs-community
project_number: 70
content_id: ${{ github.event.pull_request.node_id }}
operation: update
field: "Input Data Req'd"
value: 'Adds'
- name: New input-data directory required
if: |
contains(github.event.pull_request.labels.*.name, 'Changes Existing Input Data') &&
!contains(github.event.pull_request.labels.*.name, 'Adds Input Data')
uses: github/update-project-action@af4f6083118f5080c89828b421ef598d1906fb60 #v4
with:
github_token: ${{ secrets.PR_PROJECT_TOKEN }}
organization: ufs-community
project_number: 70
content_id: ${{ github.event.pull_request.node_id }}
operation: update
field: "Input Data Req'd"
value: 'Create New'
- name: No input data changes
if: |
(!contains(github.event.pull_request.labels.*.name, 'Changes Existing Input Data')) &&
(!contains(github.event.pull_request.labels.*.name, 'Adds Input Data'))
uses: github/update-project-action@af4f6083118f5080c89828b421ef598d1906fb60 #v4
with:
github_token: ${{ secrets.PR_PROJECT_TOKEN }}
organization: ufs-community
project_number: 70
content_id: ${{ github.event.pull_request.node_id }}
operation: update
field: "Input Data Req'd"
value: 'None'
- name: Contradictory labels
if: |
contains(github.event.pull_request.labels.*.name, 'Adds Input Data') &&
contains(github.event.pull_request.labels.*.name, 'Changes Existing Input Data')
uses: github/update-project-action@af4f6083118f5080c89828b421ef598d1906fb60 #v4
with:
github_token: ${{ secrets.PR_PROJECT_TOKEN }}
organization: ufs-community
project_number: 70
content_id: ${{ github.event.pull_request.node_id }}
operation: update
field: "Input Data Req'd"
value: 'Unknown'
priority-labels:
name: Priority
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Read Priority field
uses: github/update-project-action@af4f6083118f5080c89828b421ef598d1906fb60 #v4
id: priority_field
with:
github_token: ${{ secrets.PR_PROJECT_TOKEN }}
organization: ufs-community
project_number: 70
content_id: ${{ github.event.pull_request.node_id }}
operation: read
field: Priority
- name: Normal Priority
if: |
!contains(github.event.pull_request.labels.*.name, 'Priority: Critical') &&
!contains(github.event.pull_request.labels.*.name, 'Priority: High') &&
!contains(steps.priority_field.outputs.field_read_value, 'Combine')
uses: github/update-project-action@af4f6083118f5080c89828b421ef598d1906fb60 #v4
with:
github_token: ${{ secrets.PR_PROJECT_TOKEN }}
organization: ufs-community
project_number: 70
content_id: ${{ github.event.pull_request.node_id }}
operation: update
field: 'Priority'
value: 'Normal'
- name: Critical priority
if: |
contains(github.event.pull_request.labels.*.name, 'Priority: Critical') &&
!contains(steps.priority_field.outputs.field_read_value, 'Combine')
uses: github/update-project-action@af4f6083118f5080c89828b421ef598d1906fb60 #v4
with:
github_token: ${{ secrets.PR_PROJECT_TOKEN }}
organization: ufs-community
project_number: 70
content_id: ${{ github.event.pull_request.node_id }}
operation: update
field: 'Priority'
value: 'Critical'
- name: High Priority
if: |
(contains(github.event.pull_request.labels.*.name, 'Priority: High')) &&
!contains(steps.priority_field.outputs.field_read_value, 'Combine')
uses: github/update-project-action@af4f6083118f5080c89828b421ef598d1906fb60 #v4
with:
github_token: ${{ secrets.PR_PROJECT_TOKEN }}
organization: ufs-community
project_number: 70
content_id: ${{ github.event.pull_request.node_id }}
operation: update
field: 'Priority'
value: 'High'
- name: Unknown Priority
if: |
contains(github.event.pull_request.labels.*.name, 'Priority: Critical') &&
contains(github.event.pull_request.labels.*.name, 'Priority: High') &&
!contains(steps.priority_field.outputs.field_read_value, 'Combine')
uses: github/update-project-action@af4f6083118f5080c89828b421ef598d1906fb60 #v4
with:
github_token: ${{ secrets.PR_PROJECT_TOKEN }}
organization: ufs-community
project_number: 70
content_id: ${{ github.event.pull_request.node_id }}
operation: update
field: 'Priority'
value: 'Unknown'
subcomponent-labels:
name: Subcomponents involved
runs-on: ubuntu-latest
permissions:
contents: read
env:
SUBCOMPONENTS: ''
steps:
- name: UFSATM
if: contains(github.event.pull_request.labels.*.name, 'UFSATM')
run: echo "SUBCOMPONENTS=${SUBCOMPONENTS} UFSATM" >> $GITHUB_ENV
- name: CCPP
if: contains(github.event.pull_request.labels.*.name, 'CCPP')
run: echo "SUBCOMPONENTS=${SUBCOMPONENTS} CCPP" >> $GITHUB_ENV
- name: atmos_cubed_sphere
if: contains(github.event.pull_request.labels.*.name, 'A3S')
run: echo "SUBCOMPONENTS=${SUBCOMPONENTS} A3S" >> $GITHUB_ENV
- name: MPAS
if: contains(github.event.pull_request.labels.*.name, 'MPAS')
run: echo "SUBCOMPONENTS=${SUBCOMPONENTS} MPAS" >> $GITHUB_ENV
- name: UPP
if: contains(github.event.pull_request.labels.*.name, 'UPP')
run: echo "SUBCOMPONENTS=${SUBCOMPONENTS} UPP" >> $GITHUB_ENV
- name: stochastic_physics
if: contains(github.event.pull_request.labels.*.name, 'SP')
run: echo "SUBCOMPONENTS=${SUBCOMPONENTS} SP" >> $GITHUB_ENV
- name: AQM
if: contains(github.event.pull_request.labels.*.name, 'AQM')
run: echo "SUBCOMPONENTS=${SUBCOMPONENTS} AQM" >> $GITHUB_ENV
- name: CMEPS
if: contains(github.event.pull_request.labels.*.name, 'CMEPS')
run: echo "SUBCOMPONENTS=${SUBCOMPONENTS} CMEPS" >> $GITHUB_ENV
- name: CDEPS
if: contains(github.event.pull_request.labels.*.name, 'CDEPS')
run: echo "SUBCOMPONENTS=${SUBCOMPONENTS} CDEPS" >> $GITHUB_ENV
- name: CICE
if: contains(github.event.pull_request.labels.*.name, 'CICE')
run: echo "SUBCOMPONENTS=${SUBCOMPONENTS} CICE" >> $GITHUB_ENV
- name: CECE
if: contains(github.event.pull_request.labels.*.name, 'CECE')
run: echo "SUBCOMPONENTS=${SUBCOMPONENTS} CECE" >> $GITHUB_ENV
- name: CATChem
if: contains(github.event.pull_request.labels.*.name, 'CATChem')
run: echo "SUBCOMPONENTS=${SUBCOMPONENTS} CATChem" >> $GITHUB_ENV
- name: GOCART
if: contains(github.event.pull_request.labels.*.name, 'GOC')
run: echo "SUBCOMPONENTS=${SUBCOMPONENTS} GOC" >> $GITHUB_ENV
- name: MOM6
if: contains(github.event.pull_request.labels.*.name, 'MOM')
run: echo "SUBCOMPONENTS=${SUBCOMPONENTS} MOM" >> $GITHUB_ENV
- name: NOAHMP
if: contains(github.event.pull_request.labels.*.name, 'NMP')
run: echo "SUBCOMPONENTS=${SUBCOMPONENTS} NMP" >> $GITHUB_ENV
- name: WW3
if: contains(github.event.pull_request.labels.*.name, 'WW3')
run: echo "SUBCOMPONENTS=${SUBCOMPONENTS} WW3" >> $GITHUB_ENV
- name: LM4
if: contains(github.event.pull_request.labels.*.name, 'LM4')
run: echo "SUBCOMPONENTS=${SUBCOMPONENTS} LM4" >> $GITHUB_ENV
- name: FB
if: contains(github.event.pull_request.labels.*.name, 'FB')
run: echo "SUBCOMPONENTS=${SUBCOMPONENTS} FB" >> $GITHUB_ENV
- name: CCPP-sub
if: contains(github.event.pull_request.labels.*.name, 'CCPP-sub')
run: echo "SUBCOMPONENTS=${SUBCOMPONENTS} CCPP-sub" >> $GITHUB_ENV
- name: Update subcomponents text
if: ${{ env.SUBCOMPONENTS != '' }}
uses: github/update-project-action@af4f6083118f5080c89828b421ef598d1906fb60 #v4
with:
github_token: ${{ secrets.PR_PROJECT_TOKEN }}
organization: ufs-community
project_number: 70
content_id: ${{ github.event.pull_request.node_id }}
operation: update
field: "Subcomponent PRs"
value: ${{ env.SUBCOMPONENTS }}
- name: WM only
if: ${{ env.SUBCOMPONENTS == '' }}
uses: github/update-project-action@af4f6083118f5080c89828b421ef598d1906fb60 #v4
with:
github_token: ${{ secrets.PR_PROJECT_TOKEN }}
organization: ufs-community
project_number: 70
content_id: ${{ github.event.pull_request.node_id }}
operation: update
field: "Subcomponent PRs"
value: 'WM only'