fix(ci): push automated data commits with BOT_TOKEN#22
Conversation
|
Warning Review limit reached
More reviews will be available in 39 minutes and 55 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. 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)
📝 WalkthroughWalkthroughTwo GitHub Actions workflows (daily-update and weekly-digest) are updated to authenticate checkout operations using a persisted personal access token ( ChangesWorkflow bot token migration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/daily-update.yml:
- Around line 27-32: The checkout step is leaving the high-privilege BOT_TOKEN
in the job git config; update the actions/checkout invocation(s) that currently
use token: ${{ secrets.BOT_TOKEN }} to set persist-credentials: false, and then
in the commit/push section add an explicit authenticated remote (or re-run
actions/checkout with the BOT_TOKEN just before pushing) so the PAT is only
configured right before git push; target the actions/checkout entries and the
push step that references token: ${{ secrets.BOT_TOKEN }} and ensure the PAT is
not persisted across earlier steps.
In @.github/workflows/weekly-digest.yml:
- Around line 27-32: The checkout step using actions/checkout@v6 currently
passes token: ${{ secrets.BOT_TOKEN }} which causes the admin PAT to be
persisted; update the checkout step to add persist-credentials: false so
credentials are not kept for the remainder of the job, and then modify the
"Commit and push" step to explicitly authenticate (e.g., set GIT_AUTH or use a
separate checkout/push action) only at push time using secrets.BOT_TOKEN; ensure
you reference actions/checkout@v6, persist-credentials: false, and the "Commit
and push" step when making the change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 7d965399-b760-4574-8fd0-4f9ba643319f
📒 Files selected for processing (2)
.github/workflows/daily-update.yml.github/workflows/weekly-digest.yml
The daily-update / weekly-digest jobs pushed with the default GITHUB_TOKEN
(github-actions[bot]), which the 'main' ruleset rejected ('repository rule
violations') since the bot is not a bypass actor — so no track data had been
committed since initial setup. Persist the BOT_TOKEN PAT (whose admin owner is
in the ruleset's Repository-admin bypass list) via actions/checkout instead.
This also lets the data commits trigger deploy-pages: pushes made with
GITHUB_TOKEN are suppressed by GitHub's workflow-recursion guard, so the site
previously never refreshed after a data commit.
2d77e28 to
c4e905b
Compare
Per CodeRabbit: checkout with token + default persist-credentials left the admin PAT in .git/config for all later steps, including the repo-controlled 'make ... update' pipeline. Set persist-credentials: false and apply the PAT inline (never written to git config) only in the commit/push step.
|
Addressed in f2c9589: set |
Problem
daily-update/weekly-digesthave been firing on schedule but failing every run — no track data has been committed since the initial setup (2026-05-17).Root cause from the run logs:
The jobs pushed with the default
GITHUB_TOKEN(github-actions[bot]), which themainruleset rejects because the bot is not a bypass actor.Fix
Persist the
BOT_TOKENPAT viaactions/checkoutinstead ofGITHUB_TOKEN. The PAT's owner is an admin, which is in the ruleset's Repository-admin bypass list, so the push is allowed.Bonus: pushes made with
GITHUB_TOKENare suppressed by GitHub's workflow-recursion guard, so the data commits previously never triggereddeploy-pagesand the site went stale. A PAT push does trigger it, so the site now auto-refreshes after each data commit.Verify after merge
workflow_dispatchofdaily-update→ confirm the push lands onmainanddeploy-pagesfires.Summary by CodeRabbit