Skip to content

ci(release): run release-please with the org release app token - #89

Merged
amondnet merged 2 commits into
mainfrom
ci/release-app-token
Nov 22, 2026
Merged

amondnet merged 2 commits into
mainfrom
ci/release-app-token

Conversation

@amondnet

@amondnet amondnet commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

release-please pushes the release PR with GITHUB_TOKEN, so the PR is authored by github-actions[bot]. Its CI run is held at action_required until a maintainer approves it, which happened on #76 and again on #84 (run 44977654632).

This PR makes the release-please job mint a token for the org release app, pleaseai-release-bot (app 2162598), with actions/create-github-app-token and pass it to release-please. The release PR then runs CI like any other PR. pleaseai/shunt, statusbeam, openhwp and please already do this.

  • Credentials: the org variable RELEASE_GITHUB_APP_CLIENT_ID and secret RELEASE_GITHUB_APP_PRIVATE_KEY, both visible to all repos. The app is installed on every org repo with contents: write and pull_requests: write.
  • Token scope: the token is limited to this repository with permission-contents: write and permission-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 {}.
  • publish job: unchanged. It still uses OIDC Trusted Publishing.
  • Pinning: actions/create-github-app-token@v3.2.0 is added to actions.lock at bcd2ba4 by gh actions-lock, the same commit shunt pins.

Test plan

  • After merge, the Release run on main passes the Create app token step.
  • The release PR's next push is authored by pleaseai-release-bot[bot], and CI runs on it without approval.

Summary by cubic

Makes release-please push its release PRs as the org release app pleaseai-release-bot instead of github-actions[bot], so release PRs run CI like any other PR and are no longer held at action_required for maintainer approval.

  • The release-please job mints a repo-scoped token with contents and pull-requests write via actions/create-github-app-token@v3.2.0 and passes it to release-please; GITHUB_TOKEN no longer has any permissions in that job.
  • Credentials come from the org-wide RELEASE_GITHUB_APP_CLIENT_ID variable and RELEASE_GITHUB_APP_PRIVATE_KEY secret; the app is installed on every org repo.
  • The publish job is unchanged and still uses OIDC Trusted Publishing; the new action is pinned in actions.lock.

Written for commit 61e33b2. Summary will update on new commits.

Turn on auto-fix

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.

@gitar-bot gitar-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gitar has auto-approved this PR (configure)

@gitar-bot gitar-bot Bot added the gitar-approved Added by Gitar label Nov 22, 2026
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@greptile-apps

greptile-apps Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed changes have no established issue that blocks merging.

Summary

The PR makes release-please use the org release app instead of GITHUB_TOKEN.

  • Release pull requests now come from the org app and start CI without approval.

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

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Loading

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread .github/workflows/release.yml Resolved
v3 of create-github-app-token deprecates app-id in favour of
client-id, and the variable already holds the client id.

@gitar-bot gitar-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gitar has auto-approved this PR (configure)

@gitar-bot

gitar-bot Bot commented Nov 22, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🔴 High risk

Switching 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 pleaseai-release-bot via actions/create-github-app-token@v3.2.0, so release PRs are authored by the app and run CI without maintainer approval. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Approved

For more verification details, comment gitar display:verbose.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

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

@sonarqubecloud

Copy link
Copy Markdown

@amondnet
amondnet merged commit db62eb4 into main Nov 22, 2026
11 checks passed
@amondnet
amondnet deleted the ci/release-app-token branch November 22, 2026 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gitar-approved Added by Gitar

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant