Repository navigation
ci: scope down release/sync-docs to dedicated GitHub Apps - #78
Conversation
Replace the over-privileged shared CI bot (read+write across ~30 permission categories on all org repos) with two dedicated, minimally scoped GitHub Apps gated behind protected environments. - publish.yml: switch to actions/create-github-app-token@v3 with Publish environment (vars.PUBLISH_CI_APP_CLIENT_ID, secrets.PUBLISH_CI_APP_KEY). Drops dependency on the archived tibdex/github-app-token action. - sync-docs.yml: bump to @V3, switch to client-id, gate behind the Sync-docs environment (vars.DOCS_SYNC_APP_CLIENT_ID, secrets.DOCS_SYNC_APP_KEY). Each App should be installed only on this repo (sync-docs additionally on genlayer-docs) with Contents: read & write as the only permission.
📝 WalkthroughWalkthroughThe PR upgrades GitHub App token authentication across two CI workflows, replacing ChangesGitHub App Token Action Upgrade
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 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 docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/sync-docs.yml (1)
41-45: ⚡ Quick win
actionlintwarnings are false positives —client-idis valid in@v3
client-idwas added andapp-iddeprecated inactions/create-github-app-tokenv3.1.0 (released April 11, 2026). The@v3mutable tag now resolves to v3.1.0, so theclient-idinput works correctly at runtime and the legacyapp-idinput is also accepted, butclient-idis recommended. actionlint 1.7.12 holds a stale copy of the action's schema (pre-v3.1.0) and both its errors can be safely ignored.That said, pinning to a full commit SHA instead of
@v3is recommended supply-chain practice — a mutable tag can be silently updated to a different commit.🔒 Optional: pin to a commit SHA
- uses: actions/create-github-app-token@v3 + uses: actions/create-github-app-token@7bd037157ab4b88c8d8f5f1fcd2ebb8a48e06ee # v3.1.0🤖 Prompt for 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. In @.github/workflows/sync-docs.yml around lines 41 - 45, Replace the mutable tag actions/create-github-app-token@v3 with a pinned reference (preferably the exact commit SHA for the v3.1.0 release) to avoid supply-chain drift; keep the existing inputs (client-id, private-key, repositories) as-is and re-run actionlint (its warning is a known stale-schema false positive for client-id).
🤖 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.
Nitpick comments:
In @.github/workflows/sync-docs.yml:
- Around line 41-45: Replace the mutable tag actions/create-github-app-token@v3
with a pinned reference (preferably the exact commit SHA for the v3.1.0 release)
to avoid supply-chain drift; keep the existing inputs (client-id, private-key,
repositories) as-is and re-run actionlint (its warning is a known stale-schema
false positive for client-id).
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 4342153b-9938-4025-ac03-cf6857fc944a
📒 Files selected for processing (2)
.github/workflows/publish.yml.github/workflows/sync-docs.yml
Summary
Reduce the attack surface of the release pipeline by replacing the shared, over-privileged CI bot with two dedicated, minimally scoped GitHub Apps gated behind protected environments.
The previous setup used a single shared App with read+write across ~30 permission categories on all org repositories. The two App tokens issued from CI workflows are now narrowly scoped:
publish.yml— moved under thePublishenvironment, switched from the archivedtibdex/github-app-token@v1to the officialactions/create-github-app-token@v3. Readsvars.PUBLISH_CI_APP_CLIENT_IDandsecrets.PUBLISH_CI_APP_KEY.sync-docs.yml— bumpedactions/create-github-app-tokento@v3, switched to the explicitclient-idparameter, gated behind theSync-docsenvironment. Readsvars.DOCS_SYNC_APP_CLIENT_IDandsecrets.DOCS_SYNC_APP_KEY. Cross-reporepositories: genlayer-docstoken request is preserved.Each App should be installed only on the repos it needs (Publish: this repo only; Sync-docs: this repo +
genlayer-docs) withContents: Read & writeas the only permission.Pre-merge checklist (GitHub side)
Publishenvironment exists withPUBLISH_CI_APP_CLIENT_ID(variable) andPUBLISH_CI_APP_KEY(secret)Sync-docsenvironment exists withDOCS_SYNC_APP_CLIENT_ID(variable) andDOCS_SYNC_APP_KEY(secret)genlayer-testing-suite(sync-docs App also ongenlayer-docs) with onlyContents: Read & writePublishApp added to branch-protection bypass list onmain(semantic-release pushes the version-bump commit + tag)Test plan
fix:orfeat:commit onmainafter merge and confirmpublish.ymlmints a token, semantic-release pushes the version bump + tag, the GitHub Release is created, and PyPI upload succeedssync-docs.ymlfires automatically onrelease: publishedand pushes the API-reference update PR/commit togenlayer-docsSummary by CodeRabbit