discourse/.github/workflows/labeler.yml
Natalie Tay 6c95779712
DEV: Add extra permission to allow labeller to work in PRs (#33579)
Seeing the following in
https://github.com/discourse/discourse/actions/runs/16209614945/job/45767099809?pr=33577

```
The configuration file (path: .github/labeler.yml) was not found locally, fetching via the api
Error: HttpError: You do not have permission to create labels on this repository.: {"resource":"Repository","field":"label","code":"unauthorized"}
Error: You do not have permission to create labels on this repository.: {"resource":"Repository","field":"label","code":"unauthorized"}
```

Related: https://github.com/orgs/community/discussions/156181
2025-07-11 15:02:54 +08:00

20 lines
454 B
YAML

name: Pull Request Labeler
on:
- pull_request_target
permissions:
contents: read
pull-requests: write
issues: write # Needed for labeler to add labels to PRs: https://github.com/orgs/community/discussions/156181
jobs:
triage:
if: github.actor != 'discourse-translator-bot'
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
sync-labels: true