Skip to content

[ci] Fix BOT_TOKEN auth for Flex endpoint push and PR diff comment#1540

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

[ci] Fix BOT_TOKEN auth for Flex endpoint push and PR diff comment#1540
nicolas-grekas merged 1 commit into
mainfrom
fix-flex-endpoint-token-2

Conversation

@nicolas-grekas

Copy link
Copy Markdown
Member

Follow-up to #1539, which did not fully fix the QA failures. Two issues remained:

Flex endpoint push — embedding BOT_TOKEN in the push URL was not enough. actions/checkout persists an http.https://github.com/.extraheader Authorization header (carrying the default, now read-only GITHUB_TOKEN) into .git/config, and git sends that header in preference to URL-embedded credentials. The push therefore authenticated as github-actions[bot]:

remote: Permission to symfony/recipes.git denied to github-actions[bot].
fatal: ... error: 403

Fixed by unsetting that header before pushing, so the BOT_TOKEN in the URL is used.

PR diff commentmarocchino/sticky-pull-request-comment reads its token from the GITHUB_TOKEN input (default ${{ github.token }}), not from the GITHUB_TOKEN env var. The env var added in #1539 was ignored and the read-only default token was still used (Resource not accessible by integration). Fixed by passing the token via with: instead.

🤖 Generated with Claude Code

The previous attempt still failed:

- The Flex push embedded the token in the URL, but actions/checkout had
  persisted an http.<host>.extraheader Authorization for the default
  GITHUB_TOKEN, which git sends in preference to the URL credentials —
  so the push authenticated as github-actions[bot] and got 403. Unset
  that header before pushing so the BOT_TOKEN in the URL is used.

- marocchino/sticky-pull-request-comment reads the token from its
  GITHUB_TOKEN input (default github.token), not the env var, so the
  read-only default token was still used. Pass it via "with:" instead.

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:23
@nicolas-grekas nicolas-grekas merged commit bbc7cc6 into main May 29, 2026
1 of 2 checks passed
@nicolas-grekas nicolas-grekas deleted the fix-flex-endpoint-token-2 branch May 29, 2026 16:26
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