Skip the auto-assign job on pull requests from forks - #40
Draft
Julianacodes wants to merge 1 commit into
Draft
Julianacodes wants to merge 1 commit into
Julianacodes wants to merge 1 commit into
Conversation
GITHUB_TOKEN is forced read-only for pull_request events originating from a fork, regardless of the permissions block, so the add-assignees call fails with "Resource not accessible by integration". Fork authors are not assignable on this repo anyway, so the call would be a silent no-op even with a writable token. Skip the job instead of failing the check. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Juliana Hernandez <juliana88h@gmail.com>
joe-sharp
approved these changes
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
Auto Author Assigncheck fails on every pull request opened from a fork, most recently on #39:auto-assign-author.ymlrequestspull-requests: write, but the job log shows the token it actually received:GitHub forces
GITHUB_TOKENdown to read-only forpull_requestevents originating from a fork, regardless of thepermissionsblock, so the add-assignees call is rejected before it runs.Worth noting the job would not accomplish anything on these PRs even with a writable token. Assignees who lack push access are silently dropped by the API, and fork authors are typically not collaborators here, so the call would return
201having assigned nobody.This gates the job on the PR head living in this repo, so it skips (neutral) on fork PRs rather than failing. Branches pushed directly to
procore-ossare unaffected and keep auto-assigning.Test plan
assigncheck on this PR reports as skipped rather than failed. This PR is itself from a fork, and the workflow triggers onpull_request(notpull_request_target), so the head-commit version of the file is what runsMade with Cursor