diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.yml new file mode 100644 index 0000000..0e279b6 --- /dev/null +++ b/.github/workflows/issue-triage.yml @@ -0,0 +1,31 @@ +name: Issue triage + +on: + issues: + types: [opened, reopened] + +permissions: + issues: write + +jobs: + add-triage-label: + runs-on: ubuntu-latest + steps: + - name: Add triage label for non-maintainer issues + if: > + github.event.issue.author_association != 'OWNER' && + github.event.issue.author_association != 'MEMBER' + uses: actions/github-script@v7 + with: + script: | + const label = "status/triage"; + const existing = context.payload.issue.labels.map(l => l.name); + + if (!existing.includes(label)) { + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.issue.number, + labels: [label], + }); + } \ No newline at end of file diff --git a/.gitignore b/.gitignore index c398c28..5f7900e 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,6 @@ test/logs/ # Approval Tests **/.approval_tests_temp + +# Git worktrees in repo root +.worktrees/ \ No newline at end of file