chore: replace $(azuresdk-github-pat) with $(GH_TOKEN) and add login-to-github step#26871
Open
Copilot wants to merge 3 commits into
Open
chore: replace $(azuresdk-github-pat) with $(GH_TOKEN) and add login-to-github step#26871Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
…to-github step Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-go/sessions/0ec8d865-9919-40f2-80bd-4cb39f027670 Co-authored-by: chidozieononiwu <31145988+chidozieononiwu@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
chidozieononiwu
May 23, 2026 01:11
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Azure DevOps pipeline YAMLs to stop using the static $(azuresdk-github-pat) and instead mint a short-lived GitHub App installation token via the standard login-to-github.yml step, consuming it through $(GH_TOKEN).
Changes:
- Added
/eng/common/pipelines/templates/steps/login-to-github.ymlbefore GitHub token usage in relevant pipelines. - Replaced
$(azuresdk-github-pat)references with$(GH_TOKEN)in the updated pipelines.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| eng/pipelines/templates/jobs/archetype-go-release.yml | Adds login-to-github and switches the Verify step’s GitHub token env from the PAT to $(GH_TOKEN). |
| eng/pipelines/mgmt-auto-release.yml | Adds login-to-github and switches the script argument from the PAT to $(GH_TOKEN). |
ce9761b to
af5b424
Compare
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.
Summary
Replaces all references to
$(azuresdk-github-pat)in YAML pipeline files outside ofeng/commonwith$(GH_TOKEN), and adds alogin-to-githubstep before each usage to mint the token via the standard GitHub App login template.Files changed
eng/pipelines/templates/jobs/archetype-go-release.ymllogin-to-github.ymltemplate step before thePowerShell@2task inCheckReleaseJobthat uses the GitHub token.$(azuresdk-github-pat)→$(GH_TOKEN)in the task'senvsection.eng/pipelines/mgmt-auto-release.ymllogin-to-github.ymltemplate step before theShellScript@2task that passes the GitHub token as an argument.$(azuresdk-github-pat)→$(GH_TOKEN)in the scriptargs.Login template used
This mints a short-lived GitHub App installation token and exports it as the
GH_TOKENpipeline variable, replacing the need for the static PAT$(azuresdk-github-pat).Related files NOT changed (under
eng/common, excluded per task scope)eng/common/pipelines/templates/steps/git-push-changes.ymleng/common/pipelines/templates/steps/create-pull-request.ymleng/common/pipelines/templates/steps/verify-restapi-spec-location.ymleng/common/pipelines/templates/steps/create-tags-and-git-release.ymlgo - aztemplate - Successful run
go - mgmt auto release