2022-12-24 00:31:02 +02:00
|
|
|
name: issue closed
|
|
|
|
|
|
|
|
on:
|
|
|
|
issues:
|
|
|
|
types: [closed]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
issue-closed:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-10-05 09:27:06 +02:00
|
|
|
- uses: actions/github-script@v7
|
2022-12-24 00:31:02 +02:00
|
|
|
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,
|
|
|
|
}
|
|
|
|
)
|
2023-05-30 23:24:01 +02:00
|
|
|
if (labels.find(label => label.name === 'state: needs triage')) {
|
2022-12-24 00:31:02 +02:00
|
|
|
github.rest.issues.removeLabel({
|
|
|
|
owner: context.repo.owner,
|
|
|
|
repo: context.repo.repo,
|
|
|
|
issue_number: context.issue.number,
|
2023-05-30 23:24:01 +02:00
|
|
|
name: 'state: needs triage'
|
2022-12-24 00:31:02 +02:00
|
|
|
})
|
|
|
|
}
|