You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-1Lines changed: 34 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,14 +7,16 @@ Its job is to:
7
7
- keep this repo's label config in sync with the labels currently defined on the repo
8
8
- validate config changes automatically
9
9
- sync the resulting label set across the rest of the organization
10
+
- remove an exact label from issues and pull requests across the filtered repository set
10
11
11
12
## How It Works
12
13
13
-
This repo uses three workflows:
14
+
This repo uses four workflows:
14
15
15
16
1.`Config-Label_Sync`
16
17
2.`Validate-Configs`
17
18
3.`Org-Label-Sync`
19
+
4.`remove-labels`
18
20
19
21
The normal flow is:
20
22
@@ -33,6 +35,7 @@ The normal flow is:
33
35
| `-- workflows/
34
36
| |-- config-label-sync.yml
35
37
| |-- org-label-sync.yml
38
+
| |-- remove-labels.yml
36
39
| `-- validate-configs.yml
37
40
|-- config/
38
41
| |-- auto-pruned-labels.jsonc
@@ -194,6 +197,7 @@ Validation includes:
194
197
- invalid colors
195
198
- invalid repo names
196
199
- overlap detection between `labels.jsonc` and `auto-pruned-labels.jsonc`
200
+
- validation for the shared config used by `remove-labels`
197
201
198
202
### `Org-Label-Sync`
199
203
@@ -221,6 +225,35 @@ What it does:
221
225
8. Deletes labels listed in `config/auto-pruned-labels.jsonc`
222
226
9. Optionally deletes any other unmanaged labels if `delete_missing` or `deleteMissingByDefault` is enabled
223
227
228
+
### `remove-labels`
229
+
230
+
File: `.github/workflows/remove-labels.yml`
231
+
232
+
Trigger:
233
+
234
+
- manual via `workflow_dispatch`
235
+
236
+
Inputs:
237
+
238
+
-`run_on_issues`: remove the label from matching issues
239
+
-`closed_only`: when `run_on_issues` is enabled, only target closed issues
240
+
-`run_on_pull_requests`: remove the label from matching pull requests
241
+
-`merged_only`: when `run_on_pull_requests` is enabled, only target merged pull requests
242
+
-`label_name`: exact label name to remove
243
+
244
+
What it does:
245
+
246
+
1. Checks out the latest default branch
247
+
2. Loads the org name and token secret name from `config/properties.jsonc`
248
+
3. Validates the shared config inputs used for repo discovery
249
+
4. Discovers repositories in the configured organization
250
+
5. Applies `config/repository-filter.jsonc` in whitelist or blacklist mode
251
+
6. Removes the exact label from the selected issues and/or pull requests in every remaining repository
252
+
253
+
Notes:
254
+
255
+
- GitHub Actions does not currently support conditionally hiding or nesting `workflow_dispatch` inputs, so `closed_only` and `merged_only` can be described as dependent toggles but not visually tucked under their parent checkboxes.
256
+
224
257
## Token Requirements
225
258
226
259
Create a repository secret whose name matches `labelSyncTokenSecretName` in `config/properties.jsonc`.
0 commit comments