Skip to content

ci: push with GH_TOKEN so releases bypass branch rules - #37

Merged
Kikobeats merged 1 commit into
masterfrom
Kikobeats/ci-push-with-gh-token
Dec 3, 2026
Merged

Kikobeats merged 1 commit into
masterfrom
Kikobeats/ci-push-with-gh-token

Conversation

@Kikobeats

@Kikobeats Kikobeats commented Dec 3, 2026 •

Copy link
Copy Markdown
Owner

Release and contributors jobs push to master with the credentials actions/checkout stores. Those checkout steps now use secrets.GH_TOKEN instead of secrets.GITHUB_TOKEN (or the implicit default).

Why: once this merges, an auto-merge ruleset requiring this repo's CI checks is added, so PRs wait for green and can auto-merge. A ruleset on a personal account cannot exempt GitHub Actions, so pushes made with GITHUB_TOKEN would be rejected (GH013: Required status check "test" is expected). Pushes made with GH_TOKEN act as the repo admin, whom the ruleset exempts.

How it was tested: on a throwaway repo with the same ruleset: an admin push was allowed, a GITHUB_TOKEN push was rejected with GH013, a PR blocked on a pending check auto-merged once the check passed, and an admin merge without waiting succeeded. The rewrite was checked by parsing the YAML before and after: only checkout token values change.

Side effect: pushes made with GH_TOKEN trigger workflows, which GITHUB_TOKEN pushes do not. The existing chore(release): and build: contributors guards stop a release from triggering another release.

Coveralls github-token: stays on GITHUB_TOKEN.

🤖 Generated with Claude Code


Note

Medium Risk
Swapping checkout to a privileged PAT changes who can push from CI and can trigger follow-up workflow runs if guards fail; misconfiguration of GH_TOKEN could weaken push protections.

Overview
CI checkout credentials on the contributors and release jobs now use secrets.GH_TOKEN instead of secrets.GITHUB_TOKEN for actions/checkout, so automated pushes to master (contributor list updates and release commits) run as a repo admin and are not blocked by branch rulesets that require the test status check.

Coveralls and other steps that still use the default GITHUB_TOKEN are unchanged. Pushes with GH_TOKEN can re-trigger workflows; existing commit-message guards (build: contributors, chore(release):, etc.) limit release loops.

Reviewed by Cursor Bugbot for commit 06154dd. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Chores
    • Updated the credentials used by contributor and release automation. There are no changes to app features or behavior visible to end users.

@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The contributors and release jobs now use secrets.GH_TOKEN instead of secrets.GITHUB_TOKEN for checkout.

Changes: Workflow checkout tokens

Layer / File(s) Summary
Update checkout tokens
.github/workflows/main.yml
The contributors and release jobs now use secrets.GH_TOKEN for checkout.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Other

Merge Risk: Minimal · up to 06154

The change switches CI checkout credentials so release and contributor pushes can bypass the planned branch rules. No actionable merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "ci: push with GH_TOKEN so releases bypass branch rules" matches the main change. The summary says both the contributors and release jobs now use GH_TOKEN for checkout instead of GITHUB_TOKE…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "ci: push with GH_TOKEN so releases bypass branch rules" matches the main change. The summary says both the contributors and release jobs now use GH_TOKEN for checkout instead of GITHUB_TOKEN. The PR objectives state the goal is to let those jobs push to master as a repo admin, which the planned ruleset exempts. The title is short, uses a conventional commit prefix, and names the primary intent.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 774b221f-6072-44c0-a40f-237b3f006d48
Commits

Reviewing files that changed from the base of the PR and between 5e42485 and 06154dd.

Files selected for processing: 1

  • .github/workflows/main.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage is 92.593% — Kikobeats/ci-push-with-gh-token into master. No base build found for master.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

html-encode

Details
Benchmark suite Current: 06154dd Previous: 5e42485 Ratio
decode windows-1250 from content-type 353.9 ms (347.1-359.4) 352.1 ms (346.3-356.8) 1.01
decode shift_jis from meta charset 359.2 ms (356.4-362.6) 354.9 ms (353.3-363.8) 1.01
infer shift_jis with jschardet 605.5 ms (586.4-631.8) 590.5 ms (572.2-593.7) 1.03

This comment was automatically generated by workflow using github-action-benchmark.

@Kikobeats
Kikobeats merged commit c916961 into master Dec 3, 2026
5 checks passed
@Kikobeats
Kikobeats deleted the Kikobeats/ci-push-with-gh-token branch December 3, 2026 10:38
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