Repository navigation
ci: push with GH_TOKEN so releases bypass branch rules - #37
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
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.
Release and contributors jobs push to
masterwith the credentialsactions/checkoutstores. Those checkout steps now usesecrets.GH_TOKENinstead ofsecrets.GITHUB_TOKEN(or the implicit default).Why: once this merges, an
auto-mergeruleset 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 withGITHUB_TOKENwould be rejected (GH013: Required status check "test" is expected). Pushes made withGH_TOKENact 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_TOKENpush 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 checkouttokenvalues change.Side effect: pushes made with
GH_TOKENtrigger workflows, whichGITHUB_TOKENpushes do not. The existingchore(release):andbuild: contributorsguards stop a release from triggering another release.Coveralls
github-token:stays onGITHUB_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_TOKENcould weaken push protections.Overview
CI checkout credentials on the
contributorsandreleasejobs now usesecrets.GH_TOKENinstead ofsecrets.GITHUB_TOKENforactions/checkout, so automated pushes tomaster(contributor list updates and release commits) run as a repo admin and are not blocked by branch rulesets that require theteststatus check.Coveralls and other steps that still use the default
GITHUB_TOKENare unchanged. Pushes withGH_TOKENcan 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