Skip to content

Fix: Avoid privileged endpoint when resolving release bot identity#567

Merged
d4rken merged 1 commit into
mainfrom
fix/release-prepare-bot-slug-resolve
May 1, 2026
Merged

Fix: Avoid privileged endpoint when resolving release bot identity#567
d4rken merged 1 commit into
mainfrom
fix/release-prepare-bot-slug-resolve

Conversation

@d4rken

@d4rken d4rken commented May 1, 2026

Copy link
Copy Markdown
Member

What changed

Fixes a 401 "JSON web token could not be decoded" error in the new App-token release flow. The Resolve bot identity step previously called gh api /app to fetch the App's slug, but that endpoint requires a GitHub App JWT (signed with the private key) — not the installation access token the workflow has. Switching to the action's own app-slug output avoids the privileged endpoint entirely.

Technical Context

  • The actions/create-github-app-token action exposes app-slug as a step output; using it removes the need to query the API for it
  • The remaining gh api /users/<slug>%5Bbot%5D call is fine — that endpoint accepts installation tokens
  • Verified by inspecting the action's action.yml outputs schema (token, installation-id, app-slug)

Test plan

After merge, redispatch:

gh workflow run release-prepare.yml -f bump_kind=patch -f dry_run=false

Expect Job 2's Resolve bot identity step to print outputs cleanly and the rest of Job 2 to push the bump + tag through the bypass.

@d4rken d4rken merged commit 97cbca7 into main May 1, 2026
11 checks passed
@d4rken d4rken deleted the fix/release-prepare-bot-slug-resolve branch May 1, 2026 06:55
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.

1 participant