1
0
mirror of https://github.com/go-task/task.git synced 2024-12-12 10:45:49 +02:00
task/.github/workflows/issue-closed.yml
renovate[bot] 1af7bf2670
chore(deps): update actions/github-script action to v7 (#1849)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-05 03:27:06 -04:00

30 lines
838 B
YAML

name: issue closed
on:
issues:
types: [closed]
jobs:
issue-closed:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
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'
})
}