fix(changelog): open the sync PR with the built-in token#102
Conversation
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.
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
Warning Review limit reached
Next review available in: 41 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
…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>
Why
The
changelog syncworkflow 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 withgit ... 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.tokenwithcontents: write+pull-requests: write. Keptsecrets.DOCS_REPO_PR_TOKEN || github.tokenso that if a bot PAT is added later it's preferred — a PAT-authored PR triggers CI, which aGITHUB_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_TOKENstill 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
workflow_dispatchthe sync; confirm it either opens a PR or is a clean no-op, with no 400