There was an error while loading. Please reload this page.
1 parent 0aef50c commit f107e24Copy full SHA for f107e24
1 file changed
.github/workflows/pr-cleanup.yml
@@ -0,0 +1,24 @@
1
+name: PR Cleanup
2
+on:
3
+ pull_request:
4
+ types: [closed]
5
+permissions:
6
+ contents: read
7
+ pull-requests: write
8
+jobs:
9
+ cleanup:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Remove awaiting review label
13
+ uses: actions/github-script@v9
14
+ with:
15
+ script: |
16
+ const labels = context.payload.pull_request.labels.map((label) => label.name);
17
+ if (labels.includes("awaiting review")) {
18
+ await github.rest.issues.removeLabel({
19
+ owner: context.repo.owner,
20
+ repo: context.repo.repo,
21
+ issue_number: context.payload.pull_request.number,
22
+ name: "awaiting review",
23
+ });
24
+ }
0 commit comments