Conversation
Extract labeler job from ci.yml into standalone labeler.yml workflow using pull_request_target trigger. This fixes "Resource not accessible by integration" errors on fork PRs where GITHUB_TOKEN is read-only. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Extracts the PR labeler into its own workflow and switches to pull_request_target to avoid 403 permission errors on forked PRs.
Changes:
- Added a standalone
.github/workflows/labeler.ymlworkflow triggered bypull_request_target. - Removed the labeler job from
.github/workflows/ci.yml. - Configured concurrency and token permissions for the labeler workflow.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/labeler.yml | New dedicated labeler workflow using pull_request_target with write perms for labeling. |
| .github/workflows/ci.yml | Removes embedded labeler job now handled by the standalone workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| contents: read | ||
| pull-requests: write | ||
| steps: | ||
| - uses: lablup/auto-labeler@main |
There was a problem hiding this comment.
Using a third-party action pinned to a moving ref (@main) is risky, and this is especially sensitive with pull_request_target since the workflow runs with elevated permissions. Pin the action to an immutable commit SHA (preferred) or a version tag to reduce supply-chain risk.
| - uses: lablup/auto-labeler@main | |
| - uses: lablup/auto-labeler@v1 |
| labeler: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read |
There was a problem hiding this comment.
Labeling a PR typically requires issues: write because PR labels are managed via the Issues API. With only pull-requests: write, the action may still hit 403s when trying to apply labels. Add issues: write (and keep pull-requests: write if the action needs it) to ensure labeling succeeds.
| contents: read | |
| contents: read | |
| issues: write |
Summary
Test plan
Resolves BA-4850