| 1 | name: CodeRabbit auto-label |
| 2 | |
| 3 | # Uses pull_request_target (not pull_request) so the job runs in the base repo |
| 4 | # context with write permission to add labels on PRs from forks. Safe here |
| 5 | # because we do not check out PR code and the job is gated on a specific actor. |
| 6 | on: |
| 7 | pull_request_target: |
| 8 | types: [opened, reopened] |
| 9 | |
| 10 | permissions: |
| 11 | pull-requests: write |
| 12 | |
| 13 | jobs: |
| 14 | label: |
| 15 | if: github.event.pull_request.user.login == 'PhantomKnight287' |
| 16 | runs-on: ubuntu-latest |
| 17 | steps: |
| 18 | - uses: actions-ecosystem/action-add-labels@18f1af5e3c9 # |
| 19 | with: |
| 20 | labels: auto-review |