Repository navigation
ci(release): open the changelog PR as the release App - #402
Merged
Merged
Conversation
GITHUB_TOKEN can't open pull requests in the coder org, so the release's changelog pull request failed. The build job now uploads the changed files, and a new last job (changelog) in the main-only release-pr environment opens the PR as coder-jetbrains-toolbox-release (Cloud KMS). Only that job gets id-token, so the Gradle build can't sign as the App. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sreya
approved these changes
Nov 20, 2026
fioan89
reviewed
Nov 20, 2026
| exit 0 | ||
| fi | ||
| gh auth setup-git | ||
| branch="changelog-update-$VERSION" |
Collaborator
There was a problem hiding this comment.
I wonder if we should make this part idempotent. The branch name is deterministic and the push is not forced, with no check for an existing branch or open PR. I think there are some scenarios that run into issues:
- the first run pushes the branch then fails at gh pr create; a user re-runs the failed job — the push is rejected ("fetch first") and the job stays red until a user deletes the branch.
- same for re-dispatching the same version: approve sees the tag exists, publish re-runs, and changelog dies at the push even though the PR is already open. A "skip if a PR for this head branch already exists" guard (one gh pr list call) would make re-runs clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The org no longer lets
GITHUB_TOKENopen pull requests, so the release's changelog PR fails at the end of the run withGitHub Actions is not permitted to create or approve pull requests.The build job now uploads the changed file(s) as an artifact and drops its PR permissions. A new last job,
changelog, runs in the main-onlyrelease-prenvironment. It downloads the files, checks whether anything changed, and only then mints a token fromcoder-jetbrains-toolbox-releasethrough Cloud KMS, scoped to this repo with contents and pull-request write. It pushes the branch and opens the PR with that token. Only this job requestsid-token, so the Gradle build can't sign as the App, which can create release tags. App-opened PRs also trigger CI.Merge after: coder/github-org-terraform#202 (the
release-prenv and the App'spull_requests: write) and coder/gcp#471 (the key trusts this workflow inrelease-pr) are applied, the App's new permission is accepted, andrelease-prhas the three App secrets.actionlint is clean, and zizmor shows no new findings.
🤖 Generated with Claude Code