Repository navigation
fix(release-bot): read GitHub as the Outpost App instead of a personal token - #298
Merged
Merged
Conversation
…l token The personal token in GITHUB_TOKEN expired and every release source failed with 401 on every run. Mint a GitHub App installation token per run from GITHUB_APP_ID / GITHUB_PRIVATE_KEY / GITHUB_INSTALLATION_ID (the same App the github-app service runs as), asking for metadata:read only. All watched repos are public, so ag-ui-protocol/ag-ui reads fine with the CopilotKit installation token. GITHUB_TOKEN remains a local fallback, used only when no App variable is set. A partial App configuration names the missing variable and stops the run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q4kRRroZovGcBDY8tz8KTR
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.
Problem
outpost-release-bot'sGITHUB_TOKEN(a personal token) expired. Every GitHub release source (CopilotKit, OpenBot, AG-UI) failed with 401 on every hourly run. Discord and YouTube were fine.Fix
Mint a GitHub App installation token per run from
GITHUB_APP_ID/GITHUB_PRIVATE_KEY/GITHUB_INSTALLATION_ID(the same Outpost App the github-app service runs as). The JWT is signed withnode:crypto, so no new dependencies. The token asks formetadata: readonly. All watched repos are public, soag-ui-protocol/ag-uireads fine with the CopilotKit installation token, with no install needed in that org.GITHUB_TOKENstays as a local fallback, used only when no App variable is set.MISCONFIGUREDpattern)..env.exampleupdated.Red / green (local, real GitHub + real Discord read,
--dry-run, prod env)RED, current prod
GITHUB_TOKEN, before the change (9:24 AM PST):GREEN, App variables,
GITHUB_TOKENunset, after the change (9:26 AM PST):Both release channels are empty (never posted to), so the first run announces only the newest release per tag line, as designed.
Checks
pnpm typecheck,pnpm lint,pnpm test(241 passed, 8 new), prettier, and a localdocker buildx build -f apps/release-bot/Dockerfileall pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q4kRRroZovGcBDY8tz8KTR