Skip to content

[ci] Use BOT_TOKEN for the Flex endpoint push and PR diff comment#1539

Merged
nicolas-grekas merged 1 commit into
mainfrom
fix-flex-endpoint-token
May 29, 2026
Merged

[ci] Use BOT_TOKEN for the Flex endpoint push and PR diff comment#1539
nicolas-grekas merged 1 commit into
mainfrom
fix-flex-endpoint-token

Conversation

@nicolas-grekas

Copy link
Copy Markdown
Member

The QA workflow currently fails on every PR at two steps:

  • Generate Flex testing endpointgit push origin -f flex/pull-N returns 403 (exit code 128)
  • Post diff between recipe versionsResource not accessible by integration

Both steps relied on the default GITHUB_TOKEN persisted by actions/checkout. Since that token was reduced to read-only, neither the push nor the PR comment can succeed. The steps that were already migrated to BOT_TOKEN (secrets.token) — Automerge, MIT lint — keep working.

This authenticates both steps via BOT_TOKEN:

  • The Flex endpoint push uses an explicit https://x-access-token:<token>@github.com/<repo> URL, so the write token is not persisted into the checkout credentials and is never exposed to the untrusted pull_request_target merge ref.
  • The sticky-comment action receives the token via the GITHUB_TOKEN env var.

🤖 Generated with Claude Code

The default GITHUB_TOKEN is now read-only, so pushing the generated Flex
endpoint and posting the recipe-diff comment failed (403 / "Resource not
accessible by integration"). Authenticate both via the BOT_TOKEN without
persisting it into the checkout credentials.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) May 29, 2026 16:10
@nicolas-grekas nicolas-grekas merged commit dccaac6 into main May 29, 2026
1 of 2 checks passed
@nicolas-grekas nicolas-grekas deleted the fix-flex-endpoint-token branch May 29, 2026 16:12
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