fix(ci): restore npm, Swift, and Zepp releases without a bypass credential - #2052
Conversation
…ntial The Infisical sync is authoritative over GitHub Actions secrets and pruned ZEPP_RELEASE_TOKEN, which had only ever been set directly on the repo. All three release workflows depended on it. Zepp only ever needed contents: write on this repo, so it now uses GITHUB_TOKEN. The Swift mirror genuinely needs cross-repo access and mints a short-lived GitHub App token scoped to that repository alone. npm could never have worked as written: lerna pushed a "[skip ci]" version commit straight to main, and both branch rulesets have empty bypass_actors, so no credential could have satisfied the required checks. Versioning now goes through an auto-merging pull request that actually runs those checks, and publishing is OIDC-only with release tags pushed afterwards. A guard skips versioning while a release is still untagged so the two workflows cannot bump on top of each other. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
🤖 Review complete! 🤖 Reviewed by codereviewbot.ai - Catch bugs before your team does. |
|
Warning Review limit reached
Next review available in: 8 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: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
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 |
PR Summary by QodoRestore Zepp, Swift, and npm releases by removing shared secret dependency
AI Description
Diagram
High-Level Assessment
Files changed (7)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
149 rules✅ Skills:
fix-provider, write-tests, cloudflare 1.
|
Scope Swift App tokens to the mirror repo owner, push only created npm tags, cite Infisical sync behavior, and align package-publishing docs with the new version/publish split. Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
Root cause
The Infisical sync is authoritative over GitHub Actions secrets.
ZEPP_RELEASE_TOKENexisted only as a manually created repo secret, so the sync pruned it at18:38Z— between the last successful release (18:04Z) and the first failure (19:12Z). One token named for Zepp gated three unrelated release pipelines.Secondary finding
Release npm Packageshas never completed a release — nochore(release): publishcommit exists.lerna.jsonpushed a[skip ci]version commit straight tomain, and both branch rulesets have an emptybypass_actorslist, so no credential — including a repo-admin token — could ever have satisfied the required checks. Restoring the deleted token would not have fixed npm.Changes
GITHUB_TOKEN+ job-scopedcontents: writeversion-npm.yml: auto-merging version PRAuto-merge waits for the 9 required checks rather than bypassing them.
Two latent bugs fixed along the way:
[skip ci]would have stopped checks running on the version PR, hanging auto-merge forever.version-npmandrelease-npmfire on the same CI run; without a guard the former would re-bump before the latter tagged, looping forever. Guarded by skipping while any version is untagged.Validation
actionlintclean on all four workflows; everyrunblock passesbash -n; tagging loop exercised against the 15 real packages (0 duplicates). App key verified to sign a valid JWT fordofek-releasewith exactlycontents: write+pull_requests: write.Before merging
RELEASE_APP_CLIENT_ID(var) andRELEASE_APP_PRIVATE_KEY(Infisical → synced) are both in place. Consider narrowing the App installation fromallrepos to justdofek+whoop-ble-swift.🤖 Generated with Claude Code
Summary by cubic
Restores npm, Swift, and Zepp releases by replacing the pruned
ZEPP_RELEASE_TOKENwith scoped, least‑privilege auth. Zepp usesGITHUB_TOKEN, Swift mints a short‑lived GitHub App token scoped to the mirror owner/repo, and npm splits versioning/publishing with tags pushed post‑publish.Bug Fixes
GITHUB_TOKENwith job‑scopedcontents: write; remove hard secret check.actions/create-github-app-tokenscoped to the mirror owner/repo; use for checkout and release; droptoken_secretfrom.github/swift-packages.json.version-npm.ymlto open and auto‑merge a version PR using an App token (workflows run);release-npm.ymlonly publishes with OIDC (id-token: write) and tags only newly created<name>@<version>tags; guard prevents re‑bumping while any version is untagged; updatelernamessage tochore(release): version npm packages.Migration
RELEASE_APP_CLIENT_ID(repo var) andRELEASE_APP_PRIVATE_KEY(secret via Infisical) are set.dofekandwhoop-ble-swift.Written for commit 4002a77. Summary will update on new commits.