Skip to content

fix(changelog): open the sync PR with the built-in token#102

Merged
WomB0ComB0 merged 1 commit into
mainfrom
fix/changelog-workflow-token
Jul 24, 2026
Merged

fix(changelog): open the sync PR with the built-in token#102
WomB0ComB0 merged 1 commit into
mainfrom
fix/changelog-workflow-token

Conversation

@WomB0ComB0

Copy link
Copy Markdown
Member

Why

The changelog sync workflow from #101 ran end-to-end in a dispatch test: checkout ✅, regenerate ✅ (the generator works in CI against live releases), but the Open PR step failed with git ... HTTP 400.

Root cause: the workflow referenced secrets.DOCS_REPO_PR_TOKEN, which lives in the source SDK repos (they push into docs) but was never set in the docs repo itself. An empty token → empty git credential → 400.

Fix

Use github.token with contents: write + pull-requests: write. Kept secrets.DOCS_REPO_PR_TOKEN || github.token so that if a bot PAT is added later it's preferred — a PAT-authored PR triggers CI, which a GITHUB_TOKEN-authored one does not.

Requires a repo setting

"Allow GitHub Actions to create and approve pull requests" (Settings → Actions → General) must be on, or GITHUB_TOKEN still can't open the PR. It was off; being enabled alongside this (repo admin). Documented in the workflow comment.

Known tradeoff

A GITHUB_TOKEN-authored PR does not trigger downstream workflows, so the auto changelog PR won't auto-run mint/parity/spectral. For a version-table bump under human review that's acceptable; adding the PAT secret later removes the tradeoff.

Test plan

  • After merge + setting enabled: workflow_dispatch the sync; confirm it either opens a PR or is a clean no-op, with no 400

The workflow referenced secrets.DOCS_REPO_PR_TOKEN, which exists in the source
SDK repos (to push into docs) but not in the docs repo itself. With no token,
peter-evans got an empty credential and git failed with HTTP 400 — the generate
step ran fine, only the PR step failed.

Use github.token with contents:write + pull-requests:write, and prefer the PAT
only if it is ever added (its PRs trigger CI, which a GITHUB_TOKEN PR does not).
Requires "Allow GitHub Actions to create and approve pull requests" enabled for
the repo.
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@github-actions github-actions Bot added the area:ci GitHub Actions, workflows, CI label Jul 24, 2026
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@WomB0ComB0, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: de96b717-614e-4509-a54d-d42f832247ba

📥 Commits

Reviewing files that changed from the base of the PR and between 8bb2646 and 6337f13.

📒 Files selected for processing (1)
  • .github/workflows/changelog-sync.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/changelog-workflow-token

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@WomB0ComB0
WomB0ComB0 merged commit 7fc1272 into main Jul 24, 2026
12 checks passed
WomB0ComB0 added a commit that referenced this pull request Jul 24, 2026
…103)

The dispatch test got past auth into git, then failed with
`remote: Duplicate header: "Authorization"` / HTTP 400. actions/checkout
persists the token in the local git config, and create-pull-request adds its
own; git then sends two Authorization headers.

create-pull-request documents persist-credentials: false as the fix. This was
the actual blocker behind the 400 — the token and permission changes in #102
were necessary but not sufficient. Found by running the workflow end to end.

Co-authored-by: Mike Odnis <engineer@resq.software>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci GitHub Actions, workflows, CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants