ci: generalize bump-cursor-review-callers into a multi-workflow bump-callers dispatcher#35
ci: generalize bump-cursor-review-callers into a multi-workflow bump-callers dispatcher#35mattmillerai wants to merge 1 commit into
Conversation
…callers dispatcher One dispatcher now serves every registered reusable workflow, each with its own caller-list Actions variable (cursor-review.yml keeps CURSOR_REVIEW_CALLERS unchanged; pr-size.yml registers against PR_SIZE_CALLERS for when it lands). Push events resolve which registered workflows actually changed via the compare API (falling back to a sweep of all registered workflows), and workflow_dispatch gains a workflows filter plus a read-only dry_run mode. Per-repo failures stay fault-isolated per workflow, and one workflow's bad caller variable cannot abort another's fan-out. Replaces bump-cursor-review-callers.yml.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 28 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: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
ELI-5
Today the repo has one robot that watches
cursor-review.ymland, when it changes, opens "update your pin" PRs in every repo that uses it. A second reusable workflow (pr-size) is arriving, and copy-pasting a whole sibling robot per workflow means duplicated lists that rot. This PR turns the one-workflow robot into a single dispatcher that serves any registered reusable workflow, each with its own caller list — same bot identity, same "one bad repo doesn't stop the others" behavior, same PRs for cursor-review as before, byte-for-byte.What changed
bump-callers.ymlreplacesbump-cursor-review-callers.yml(removed in this PR; no other references existed).cursor-review.yml → CURSOR_REVIEW_CALLERS(existing variable, untouched — zero config migration) andpr-size.yml → PR_SIZE_CALLERS(registered now; seeded by the pr-size caller rollout). Registering a new workflow = 3 spots in this one file + seed the variable (documented in the header).before...sha, paginated). If that can't be determined (force-push, all-zero before), it falls back to sweeping every registered workflow — already-pinned callers no-op, so over-bumping is harmless churn while under-bumping would silently strand callers.ci/bump-<name>-<short>; unchangedci/bump-cursor-review-<short>for cursor-review), and one workflow's bad/missing caller variable cannot abort another's fan-out. The per-repo fault isolation inside a fan-out is the existingbump_one()code, unchanged except the name/file parameterization.[]is always a benign "intentionally zero callers" skip.workflow_dispatchgains two inputs:workflows(filter which registered workflows to bump; empty = all, deduped, bare names and full paths accepted) anddry_run(read-only — logs what would be bumped, opens no branches/PRs).permissions: contents: read(fixes the zizmorexcessive-permissionsfinding the old file carried).::add-mask::ed immediately after parsing, before any loop that echoes it.Verification
yaml.safe_load— valid;shellcheck -S warning -s bashon the extracted script — clean.zizmoron the new file: no new findings; the old file'sexcessive-permissions(medium) is fixed. The two remaininggithub-appfindings are pre-existing on main and inherent to the design:repositories:/permission-*scoping can't be added without either naming private repos in this public file or risking token-permission breakage (see judgment calls).gh, run underbash -eexactly like the Actions default shell: push with one/both workflows changed; push with empty variable (hard error); push with compare failure (sweep fallback + warn-skip); dispatch explicit/all/bare-name/unknown/duplicate/glob input; dry run (verified zero write calls); invalid JSON in one variable with the other workflow's fan-out still completing; per-repo metadata failure with remaining repos still bumped and the job reddened at the end; already-pinned skip; missing-file skip; explicit[]skip.ci/bump-cursor-review-<short>, commit message and PR titleci: bump cursor-review to github-workflows@<short>, and PR body identical to today's — the only text delta is the footer naming thebump-callersworkflow (the file rename).CURSOR_REVIEW_CALLERSvariable (12 entries) passes the new validation and parses to the same 12repo|file|labeltuples the unchangedbump_one()consumes.Judgment calls / notes for the reviewer
workflow_dispatch(even by ID) 404s pre-merge — I tried. Recommended immediately after merge:gh workflow run bump-callers.yml -f dry_run=true— safe (read-only), and its log shows the full resolution + per-caller "would bump" sweep with masked names.pr-size.yml↔PR_SIZE_CALLERSis registered ahead of the workflow's arrival. The paths entry on a not-yet-existing file is inert, and the sweep treats the unseeded variable as a warning-skip. If the pr-size workflow lands under a different filename, the fix is the three registered spots in this one file.dry_runandworkflowsdispatch inputs are additions, motivated by safe verification (a plain dispatch fans out real PRs) and by making the generalized dispatcher operable per-workflow. A plainworkflow_dispatchwith no inputs behaves like today's: it sweeps and bumps for real.permission-*/repositories:scoping to silence zizmor's pre-existing findings): scopingrepositories:would require naming private repos in a public file, and requesting explicitpermission-*values fails token minting outright if the app lacks any named permission (e.g. issues-write for label application) — a total-breakage risk against a cosmetic lint gain on a finding main already carries.