Remove GitHub PAT usage from release templates#44
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Azure Pipelines release templates to eliminate inline GitHub PAT usage and instead rely on persisted checkout credentials for git operations and an explicit Azure Pipelines GitHub service connection for GitHub Release creation.
Changes:
- Switch release branch/tag operations to
checkout: selfwithpersistCredentials: trueinstead of embedding$(GithubUser):$(GithubPat)in remote URLs. - Replace custom PowerShell GitHub REST calls with
GitHubRelease@1using a configurablegithubServiceConnectionparameter. - Thread the new
githubServiceConnectionparameter through the top-leveleng/ci/library-release.ymlpipeline.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| eng/templates/official/jobs/publish-release.yml | Removes PAT-based clone/REST calls; uses persisted checkout creds for tagging and GitHubRelease@1 for draft release + asset upload. |
| eng/templates/official/jobs/bump-version.yml | Removes PAT-based remote URL and makes checkout credential persistence explicit for pushing the release branch. |
| eng/ci/library-release.yml | Adds and passes githubServiceConnection to the release job template to make GitHub Release identity configurable. |
hallvictoria
approved these changes
Jun 19, 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.
Removes GitHub PAT usage from the Python release templates and makes GitHub Release identity explicit.
Changes:
checkout: selfwithpersistCredentials: trueinstead of embedding$(GithubUser):$(GithubPat)in the remote URL.GitHubRelease@1via thegithubServiceConnectionparameter.githubServiceConnectionis now an explicit release parameter, not an implicit$(GitHubServiceConnection)variable.Service connection requirement:
azfunc/publicandazfunc/internalAzure DevOps projects and did not find an existing GitHub service connection.Azure/connectors-python-sdk.githubServiceConnection=<service connection name>.Validation performed in this PR:
git diff --checkGithubPat,GithubUser, Basic auth,api.github.com, andInvoke-WebRequest; no remaining matches# Create GitHub credentialcommentsEnd-to-end validation path after service connection creation:
Azure/connectors-python-sdk.eng/ci/library-release.ymlwith a test/pre-releaselibraryVersionandgithubServiceConnection=<service connection name>.GithubPat/GithubUservariables..whl/.tar.gzassets throughGitHubRelease@1.