forked from go-task/task
-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (27 loc) · 838 Bytes
/
Copy pathissue-closed.yml
File metadata and controls
29 lines (27 loc) · 838 Bytes
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
name: issue closed
on:
issues:
types: [closed]
jobs:
issue-closed:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v8
with:
github-token: ${{secrets.GH_PAT}}
script: |
const labels = await github.paginate(
github.rest.issues.listLabelsOnIssue, {
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
}
)
if (labels.find(label => label.name === 'state: needs triage')) {
github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
name: 'state: needs triage'
})
}