2024-09-10 20:16:21 +00:00
|
|
|
name: chore
|
|
|
|
|
|
|
|
on:
|
|
|
|
issues:
|
|
|
|
types:
|
|
|
|
- opened
|
|
|
|
|
2024-09-10 22:17:04 +00:00
|
|
|
permissions:
|
|
|
|
issues: write
|
|
|
|
|
2024-09-10 20:16:21 +00:00
|
|
|
jobs:
|
2024-09-10 22:17:04 +00:00
|
|
|
add-issue-labels:
|
2024-09-10 20:16:21 +00:00
|
|
|
name: Add labels
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.repository == 'nuxt/nuxt'
|
|
|
|
steps:
|
|
|
|
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
|
|
|
with:
|
|
|
|
script: |
|
2024-09-10 22:00:51 +00:00
|
|
|
// add 'pending triage' label if issue is created with no labels
|
2024-09-10 20:16:21 +00:00
|
|
|
if (context.payload.issue.labels.length === 0) {
|
|
|
|
github.rest.issues.addLabels({
|
2024-09-11 09:04:37 +00:00
|
|
|
issue_number: context.payload.issue.number,
|
2024-09-10 20:16:21 +00:00
|
|
|
owner: context.repo.owner,
|
|
|
|
repo: context.repo.repo,
|
|
|
|
labels: ['pending triage']
|
|
|
|
})
|
|
|
|
}
|