Skip to content

ci(labeler): skip PRs from forks instead of failing on them - #24

Merged
sotashimozono merged 1 commit into
QAtlasHub:mainfrom
sotashimozono:labeler-skip-fork-prs
Aug 29, 2026
Merged

ci(labeler): skip PRs from forks instead of failing on them#24
sotashimozono merged 1 commit into
QAtlasHub:mainfrom
sotashimozono:labeler-skip-fork-prs

Conversation

@sotashimozono

Copy link
Copy Markdown
Member

A pull_request run whose head is a fork gets a read-only GITHUB_TOKEN regardless of the permissions: block, so issues.createLabel comes back 403 and the job fails.

Seen on an outside contribution — sotashimozono/Reversi.jl#54, all four test shards green, this check red:

data: {
  message: 'Resource not accessible by integration',
  documentation_url: '.../rest/issues/labels#create-a-label',
  status: '403'
}

Labelling a fork PR at all would need pull_request_target, which is a caller-side change in every repo that calls this. Skipping is the smaller correct step: the check reports as skipped rather than failed, and nothing else changes. Ten repos call this workflow.

A `pull_request` run whose head is a fork gets a read-only GITHUB_TOKEN
regardless of the `permissions:` block, so `createLabel` returns 403 and the
check goes red on a contribution that is otherwise green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sotashimozono
sotashimozono merged commit 4c80ed9 into QAtlasHub:main Aug 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant