Skip to content

chore(release): use GitHub App token for releases#166

Merged
kruton merged 1 commit into
connectbot:mainfrom
kruton:workflow-fixup
May 23, 2026
Merged

chore(release): use GitHub App token for releases#166
kruton merged 1 commit into
connectbot:mainfrom
kruton:workflow-fixup

Conversation

@kruton
Copy link
Copy Markdown
Member

@kruton kruton commented May 23, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 23, 2026 04:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the release automation GitHub Actions to mint and use a GitHub App token for release-related pushes/PR operations, and adds an explicit maintainer-authorization gate before generating the App token.

Changes:

  • Add an “Authorize release actor” step to release workflows to ensure only maintainers/admins can trigger release automation before secrets are used.
  • Generate a GitHub App token and route PUSH_TOKEN / GH_TOKEN to that token for release branch creation and release PR updates.
  • Delay configure_git_credentials calls in release scripts to closer to the git push operations.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.github/workflows/release-publish.yml Adds maintainer authorization step prior to creating the release App token.
.github/workflows/release-prepare.yml Switches pushing/PR updates to a GitHub App token; adds maintainer authorization step.
.github/workflows/release-branch.yml Switches branch push to a GitHub App token; adds maintainer authorization step.
.github/scripts/publish-release.sh Defers git credential setup until right before the push.
.github/scripts/prepare-release.sh Defers git credential setup until right before the push.
.github/scripts/create-release-branch.sh Defers git credential setup until right before the push.
Comments suppressed due to low confidence (1)

.github/scripts/publish-release.sh:68

  • configure_git_credentials is now invoked only right before git push, but this script performs multiple remote operations (git fetch, git rev-list, git show origin/...) before credentials are configured. Since the workflow uses actions/checkout with persist-credentials: false, these remote operations will run unauthenticated and will fail on private repositories (and can be less reliable under stricter org policies). Consider configuring credentials (or otherwise providing auth, e.g., via an extraheader) before the first network git operation that needs access to origin while still keeping the push token exposure minimal.
configure_git_author
git fetch origin \
  "+refs/heads/${target_branch}:refs/remotes/origin/${target_branch}" \
  "+refs/heads/${work_branch}:refs/remotes/origin/${work_branch}" \
  --tags

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/scripts/prepare-release.sh
Comment thread .github/scripts/create-release-branch.sh
Comment thread .github/workflows/release-prepare.yml
Comment thread .github/workflows/release-branch.yml
@kruton kruton merged commit 85e7ec9 into connectbot:main May 23, 2026
11 checks passed
@kruton kruton deleted the workflow-fixup branch May 23, 2026 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants