Repository navigation
fix: pin gh repo targeting in fork-sync - #6
Merged
Merged
Conversation
gh resolves the repository for PR/issue commands from the git remotes and prefers one literally named "upstream". fork-sync.sh adds exactly such a remote (actions/runner) before fetching release tags, so every gh call it makes — pr list, pr create, issue create — targeted actions/runner instead of the fork: pull request create failed: GraphQL: Resource not accessible by integration (createPullRequest) The run otherwise succeeded: the merge, workflow pinning, patch gate and branch push all worked, only the final PR creation failed. Fix: export GH_REPO for the whole script, set from the workflow for CI runs and derived from the origin remote locally (https and ssh forms). Also list the three hand-fixes to fork-sync.yml permissions in the fork-patches manifest so the gate output stays clean.
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.
Root cause of the failed PR creation in run 34838458569
ghresolves the repository for PR/issue commands from the git remotes and prefers a remote literally namedupstreamoverorigin.fork-sync.shadds exactly such a remote (pointing atactions/runner) before fetching release tags — so inside the job:gh pr listsilently queried actions/runner → found nothinggh pr createtried to create the PR in actions/runner →Resource not accessible by integrationEverything else in that run worked — merge, workflow pinning, patch gate, and the branch push (the
workflows-permission problem is solved; this was the last broken step).Fix
GH_REPO: ${{ github.repository }}for the jobGH_REPOfrom the origin remote as a local fallback (https and ssh URL forms), and only exports it when it parses to anowner/reposlugThe sync PR itself (2.337.0) was opened manually as #5; with this merged, tomorrow's run will find it open, leave a comment, and exit cleanly instead of failing.