Skip to content

fix(release-bot): read GitHub as the Outpost App instead of a personal token - #298

Merged
jpr5 merged 1 commit into
mainfrom
fix/release-bot-github-app-auth
Nov 23, 2026
Merged

jpr5 merged 1 commit into
mainfrom
fix/release-bot-github-app-auth

Conversation

@jpr5

@jpr5 jpr5 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Problem

outpost-release-bot's GITHUB_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 with node:crypto, so no new dependencies. The token asks for metadata: read only. All watched repos are public, so ag-ui-protocol/ag-ui reads fine with the CopilotKit installation token, with no install needed in that org.

  • GITHUB_TOKEN stays as a local fallback, used only when no App variable is set.
  • A partial App config names the missing variable and stops the run (added to the MISCONFIGURED pattern).
  • README and .env.example updated.

Red / green (local, real GitHub + real Discord read, --dry-run, prod env)

RED, current prod GITHUB_TOKEN, before the change (9:24 AM PST):

ag-ui failed: GhError: GitHub 401 on /repos/ag-ui-protocol/ag-ui/releases?per_page=100&page=1: {"message": "Bad credentials", ...}
copilotkit failed: GhError: GitHub 401 on /repos/CopilotKit/CopilotKit/releases?per_page=100&page=1: {"message": "Bad credentials", ...}
openbot failed: GhError: GitHub 401 on /repos/CopilotKit/OpenBot/releases?per_page=100&page=1: {"message": "Bad credentials", ...}
Error: Sources failed: ag-ui, copilotkit, openbot. The others completed.
exit=1

GREEN, App variables, GITHUB_TOKEN unset, after the change (9:26 AM PST):

--- ag-ui release/2026-11-21 ---        (summary composed)
--- copilotkit channels/v0.12.0 ---     (summary composed)
--- copilotkit v1.90.0 ---              (summary composed)
--- openbot v1.1.3 ---                  (summary composed)
exit=0

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 local docker buildx build -f apps/release-bot/Dockerfile all pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q4kRRroZovGcBDY8tz8KTR

…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
@jpr5
jpr5 merged commit 49cbefa into main Nov 23, 2026
3 checks passed
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