mirror of
https://github.com/go-task/task.git
synced 2024-12-14 10:52:43 +02:00
29 lines
756 B
YAML
29 lines
756 B
YAML
|
name: issue needs triage
|
||
|
|
||
|
on:
|
||
|
issues:
|
||
|
types: [opened]
|
||
|
|
||
|
jobs:
|
||
|
needs-triage:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/github-script@v6
|
||
|
with:
|
||
|
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.length === 0) {
|
||
|
github.rest.issues.addLabels({
|
||
|
issue_number: context.issue.number,
|
||
|
owner: context.repo.owner,
|
||
|
repo: context.repo.repo,
|
||
|
labels: ['needs triage']
|
||
|
})
|
||
|
}
|