-
Notifications
You must be signed in to change notification settings - Fork 15
35 lines (31 loc) · 1023 Bytes
/
delabeler.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
name: "Pull Request Delabeler"
on:
pull_request_target:
# type 'opened' is not included, so maintainers can create PRs with labels
# specified during creation.
types: [edited, closed, reopened, synchronize, converted_to_draft]
jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
script: |
const special = 'Review: Core +1'
const labels = await github.rest.issues.listLabelsOnIssue({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo
})
if (!labels.data.map((x) => x.name).includes(special)) {
return
}
github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: [special]
})