ci: use workflow token for production markers - #141
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 4 minutes and 55 seconds. Learn how PR review limits work. To continue reviewing without waiting, enable usage-based billing in the billing tab. ⌛ How to resolve this issue?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 credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. 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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
Validation
This unblocks marker branch creation in repos where RELEASE_APP_ID / RELEASE_APP_PRIVATE_KEY are intentionally not configured.
Greptile Summary
This PR removes the dependency on the
RELEASE_APP_ID/RELEASE_APP_PRIVATE_KEYGitHub App secrets from the production marker steps in both the runner and web release workflows, replacing the App-generated token with the built-inGITHUB_TOKEN(which already hascontents: writegranted at the workflow/job level).actions/create-github-app-tokenstep and the explicittoken:parameter fromactions/checkoutin bothpromote_marker(runner) andpromote(web) jobs — the credential stored byactions/checkout's defaultpersist-credentials: trueis now used for the subsequentgit push.production-runnerorproduction-webbranches, so the behavioral difference thatGITHUB_TOKENpushes do not triggeron: pushevents has no current impact.GITHUB_TOKENcan push to these branches depends on whether they carry branch protection rules; if they do, the repository settings must allow GitHub Actions to bypass those rules.Confidence Score: 4/5
Safe to merge if the production marker branches are unprotected or the repo already permits GitHub Actions to push to them; worth confirming branch protection configuration before landing.
The change is a clean removal of two symmetric App-token steps, the necessary contents:write permission is already in place, and no other workflows in the repo react to pushes on these marker branches. The one open question is whether production-runner / production-web carry branch protection rules that the GitHub App token was previously bypassing — if so, the push step will start failing with the workflow token too.
Both workflow files are straightforward; the only thing worth double-checking is the branch protection configuration for the production-runner and production-web branches in the repository settings.
Important Files Changed
Sequence Diagram
%%{init: {'theme': 'neutral'}}%% sequenceDiagram participant WF as Workflow (GITHUB_TOKEN) participant GH as GitHub API participant Repo as Repository Note over WF: Before: App token required WF->>GH: actions/create-github-app-token (RELEASE_APP_ID + RELEASE_APP_PRIVATE_KEY) GH-->>WF: App token WF->>Repo: checkout (token: app_token) WF->>Repo: "git push HEAD:refs/heads/production-*" Note over WF: After: Workflow token only WF->>Repo: checkout (implicit GITHUB_TOKEN, persist-credentials: true) WF->>Repo: "git push HEAD:refs/heads/production-*" Note over WF,Repo: contents:write permission granted at workflow/job level%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% sequenceDiagram participant WF as Workflow (GITHUB_TOKEN) participant GH as GitHub API participant Repo as Repository Note over WF: Before: App token required WF->>GH: actions/create-github-app-token (RELEASE_APP_ID + RELEASE_APP_PRIVATE_KEY) GH-->>WF: App token WF->>Repo: checkout (token: app_token) WF->>Repo: "git push HEAD:refs/heads/production-*" Note over WF: After: Workflow token only WF->>Repo: checkout (implicit GITHUB_TOKEN, persist-credentials: true) WF->>Repo: "git push HEAD:refs/heads/production-*" Note over WF,Repo: contents:write permission granted at workflow/job levelComments Outside Diff (1)
.github/workflows/runner-release.yml, line 238-241 (link)If
production-runner(orproduction-webin the web workflow) is a protected branch, thisgit pushwill fail with a 403 unless the repository settings explicitly allow GitHub Actions to bypass those protections. A GitHub App token used previously could be configured to bypass protections via the app's installation permissions. If these marker branches are unprotected, this is fine as-is; but if branch protection was part of why the App token was originally introduced, the push will still fail — just with a different error than "missing secrets".Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Reviews (1): Last reviewed commit: "ci: use workflow token for production ma..." | Re-trigger Greptile