Remove azsdk pat usage#47697
Open
chidozieononiwu wants to merge 2 commits into
Open
Conversation
Related to Azure/azure-sdk-tools#9842 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
afc7f42 to
88a1279
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the Python SDK pipelines off the long-lived azuresdk-github-pat secret toward short-lived GitHub App installation tokens (GH_TOKEN) minted by the shared login-to-github.yml template. It centralizes and standardizes GitHub authentication across CI, live-test, weekly-analysis, release, and docs pipelines, improving security and maintainability.
Changes:
- Replace
$(azuresdk-github-pat)with$(GH_TOKEN)forTokenToUseForAuthandGH_TOKENenv vars, addinglogin-to-github.ymlwhere needed (gated on-prrepos for checkout jobs). - Pass
AuthToken: ''to PR/push/release templates so they auto-login via the GitHub App instead of defaulting to the PAT. - Remove now-redundant auth config (e.g., explicit
TokenOwners) and rely on shared template defaults.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
scripts/release_helper/release_helper.yml |
Adds login-to-github.yml; AZURESDK_BOT_TOKEN now sourced from $(GH_TOKEN). |
eng/pipelines/tsp-spec-sync.yml |
Passes AuthToken: '' to create-pull-request.yml for auto-login. |
eng/pipelines/templates/steps/verify-autorest.yml |
Passes AuthToken: '' to create-pull-request.yml. |
eng/pipelines/templates/steps/build-package-artifacts.yml |
Adds login-to-github.yml for -pr builds; sparse-checkout uses $(GH_TOKEN). |
eng/pipelines/templates/stages/python-analyze-weekly.yml |
Adds login-to-github.yml; next-* check env vars use $(GH_TOKEN). |
eng/pipelines/templates/stages/archetype-python-release.yml |
Passes AuthToken: '' to release tag and version-increment PR templates. |
eng/pipelines/templates/jobs/live.tests.yml |
Adds login-to-github.yml for -pr builds; sparse-checkout uses $(GH_TOKEN). |
eng/pipelines/templates/jobs/ci.tests.yml |
Adds login-to-github.yml for -pr builds; sparse-checkout uses $(GH_TOKEN). |
eng/pipelines/prepare-pipelines.yml |
Trailing-newline-only change (no functional impact). |
eng/pipelines/docindex.yml |
Passes AuthToken: '' to both git-push-changes.yml calls. |
eng/pipelines/conda-update-pipeline.yml |
Passes AuthToken: '' to create-pull-request.yml. |
eng/pipelines/aggregate-reports.yml |
Removes explicit TokenOwners, relying on login-to-github.yml defaults. |
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.
This is adding back the changes in this PR #46709
Avoid calling
/eng/common/pipelines/templates/steps/login-to-github.ymlon public run.