Skip to content

fix: use UPSTREAM_GITHUB_TOKEN for model sync branch push#9

Merged
R-Taneja merged 1 commit into
devfrom
fix/model-sync-branch-token
May 19, 2026
Merged

fix: use UPSTREAM_GITHUB_TOKEN for model sync branch push#9
R-Taneja merged 1 commit into
devfrom
fix/model-sync-branch-token

Conversation

@R-Taneja
Copy link
Copy Markdown

@R-Taneja R-Taneja commented May 19, 2026

Summary

  • Fixes run 26115015355 which failed at the create-pr step with Resource not accessible by integration when creating the branch ref on this fork.
  • peter-evans/create-pull-request@v8 with sign-commits: true uses the REST API (POST /git/refs) instead of git push. That call is made against the fork (push-to-fork) using branch-token, which was the default GITHUB_TOKEN. Despite the workflow declaring contents: write, the token came back read-only — likely due to the repo/org default workflow permissions on a fork.
  • Reuse UPSTREAM_GITHUB_TOKEN (already used for opening the PR upstream) for branch-token so the ref-create succeeds.

Default GITHUB_TOKEN on this fork lacks contents:write at runtime
(repo/org policy), so peter-evans/create-pull-request fails creating
the branch ref on the fork via REST API. Reuse UPSTREAM_GITHUB_TOKEN
which already has write access.
@R-Taneja R-Taneja requested a review from jerilynzheng May 19, 2026 18:08
@R-Taneja R-Taneja merged commit f37632c into dev May 19, 2026
3 checks 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.

2 participants