-
Notifications
You must be signed in to change notification settings - Fork 253
38 lines (36 loc) · 1.05 KB
/
label-cleanup.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
name: Label cleanup
on:
pull_request_target:
types:
- closed
jobs:
remove-label:
name: Cleanup after PR Triage
if: github.event.pull_request.merged
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
script: |
const labels = [
'Work in progress',
'PR: draft',
'PR: unreviewed',
'PR: reviewed-changes-requested',
'PR: partially-approved',
'PR: reviewed-approved'
];
for (const label of labels)
try
{
await github.rest.issues.removeLabel({
name: label,
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo
});
}
catch (e)
{
core.warning(`failed to remove label: ${label}: ${e.message}`);
}