Fix extension release workflow PR branch authentication#17737
Merged
adamint merged 1 commit intoMay 30, 2026
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17737Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17737" |
Contributor
There was a problem hiding this comment.
Pull request overview
Replaces the previous bearer http.extraHeader Git auth with an x-access-token URL embedded in origin's remote URL so git push (and ls-remote/fetch) of the extension-release/v<version> branch authenticates correctly using the GitHub App token, matching the pattern already used elsewhere in the repo.
Changes:
- Set
originremote URL tohttps://x-access-token:${GH_TOKEN}@.../${REPOSITORY}.gitbefore remote Git operations. - Disable interactive Git prompts via
GIT_TERMINAL_PROMPT=0to fail fast on auth errors. - Drop the
http.extraHeader=AUTHORIZATION: bearer ...per-command overrides forls-remote,fetch, andpush.
DamianEdwards
approved these changes
May 30, 2026
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.
Description
The Extension Release workflow could pass its permission gate and prepare release files, then fail when pushing the
extension-release/v...branch because checkout intentionally usespersist-credentials: falseand the previous bearerhttp.extraHeaderapproach did not provide Git HTTPS credentials forgit push.This configures
originwith the GitHub App token using the repository's existingx-access-tokenremote URL pattern beforels-remote,fetch, andpush, and disables interactive Git prompts so authentication failures fail clearly in CI. The draft release PR still uses the GitHub App token, then removes/re-adds thevscode-extension-releaselabel so the downstream extension changelog agentic workflow receives a freshpull_requestlabeledevent.Validation:
Create draft pull requestshell script withbash -n.git diff --check.https://x-access-token:<token>@github.com/<repo>.gitcredential shape can non-interactively push and delete a temporary branch.pull_requestlabeledevents gated on thevscode-extension-releaselabel for same-repo PRs.Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?