Repository navigation
ci(release): run release-please with the org release app token - #89
Conversation
A release PR pushed with GITHUB_TOKEN is authored by github-actions[bot], and its CI run is held at action_required until a maintainer approves it (#76, #84). Mint a token for pleaseai-release-bot, scoped to contents and pull-requests write, and pass it to release-please so the release PR runs CI like any other PR. GITHUB_TOKEN no longer needs any scope in that job.
Up to standards ✅🟢 Issues
|
[Medium impact] The reviewed changes have no established issue that blocks merging. SummaryThe PR makes
No new actionable issues were established. The upstream action inputs could not be independently checked because GitHub access required authentication. No workflows were run. Reviews (2) · Last reviewed commit: "ci(release): pass the release app client..." · Reviewed by Greptile |
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/workflows/release.yml">
<violation number="1" location=".github/workflows/release.yml:34">
P2: This passes the Client ID to the deprecated `app-id` input. Use `client-id` so the input matches the `RELEASE_GITHUB_APP_CLIENT_ID` variable and avoids the deprecation warning, which could break on a future major version.</violation>
</file>
Architecture diagram
sequenceDiagram
participant GH as GitHub Actions Runner
participant GHA as GITHUB_TOKEN
participant App as Org Release App (pleaseai-release-bot)
participant RP as release-please-action
participant GHAPI as GitHub API
participant CI as PR CI Workflows
Note over GH,CI: Release workflow - release-please job
GH->>GHA: No permissions ({})
GH->>App: actions/create-github-app-token
Note over GH,App: Uses RELEASE_GITHUB_APP_CLIENT_ID var + RELEASE_GITHUB_APP_PRIVATE_KEY secret
App-->>GH: Repo-scoped token (contents: write, pull-requests: write)
GH->>RP: release-please-action with app token
RP->>GHAPI: Create/update release PR (authored by pleaseai-release-bot)
GHAPI-->>RP: Release PR created/updated
RP-->>GH: Outputs (releases_created, paths_released)
GHAPI-->>CI: Trigger CI on release PR
CI->>CI: Run without approval
Note over GHAPI,CI: Publish job (unchanged)
GH->>GHAPI: OIDC Trusted Publishing for PyPI
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
v3 of create-github-app-token deprecates app-id in favour of client-id, and the variable already holds the client id.
Code Review ✅ Approved 🔴 High riskSwitching release automation to an org-app token with contents and pull-request write authority could let a compromised job alter repository content or release PRs. Switches the release-please job to mint a token for the org release app VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Approved For more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Important Your trial ends in 5 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more. Was this helpful? React with 👍 / 👎 | Gitar |
|



Summary
release-please pushes the release PR with
GITHUB_TOKEN, so the PR is authored bygithub-actions[bot]. Its CI run is held ataction_requireduntil a maintainer approves it, which happened on #76 and again on #84 (run 44977654632).This PR makes the
release-pleasejob mint a token for the org release app,pleaseai-release-bot(app 2162598), withactions/create-github-app-tokenand pass it to release-please. The release PR then runs CI like any other PR. pleaseai/shunt, statusbeam, openhwp and please already do this.RELEASE_GITHUB_APP_CLIENT_IDand secretRELEASE_GITHUB_APP_PRIVATE_KEY, both visible to all repos. The app is installed on every org repo withcontents: writeandpull_requests: write.permission-contents: writeandpermission-pull-requests: write, which covers release PRs, labels, tags and GitHub releases.GITHUB_TOKEN: the job no longer uses it, so its permissions drop to{}.publishjob: unchanged. It still uses OIDC Trusted Publishing.actions/create-github-app-token@v3.2.0is added toactions.lockatbcd2ba4bygh actions-lock, the same commit shunt pins.Test plan
Releaserun on main passes theCreate app tokenstep.pleaseai-release-bot[bot], andCIruns on it without approval.Summary by cubic
Makes release-please push its release PRs as the org release app
pleaseai-release-botinstead ofgithub-actions[bot], so release PRs run CI like any other PR and are no longer held ataction_requiredfor maintainer approval.release-pleasejob mints a repo-scoped token withcontentsandpull-requestswrite viaactions/create-github-app-token@v3.2.0and passes it to release-please;GITHUB_TOKENno longer has any permissions in that job.RELEASE_GITHUB_APP_CLIENT_IDvariable andRELEASE_GITHUB_APP_PRIVATE_KEYsecret; the app is installed on every org repo.publishjob is unchanged and still uses OIDC Trusted Publishing; the new action is pinned inactions.lock.Written for commit 61e33b2. Summary will update on new commits.