Repository navigation
Open version bump PR after official SqlClient release - #5093
Open
cheenamalhotra wants to merge 6 commits into
Open
cheenamalhotra wants to merge 6 commits into
cheenamalhotra wants to merge 6 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…llback Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
cheenamalhotra
requested review from
a team
and
a balanced review from Copilot
November 17, 2026 06:31
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The fallback milestone can make generated PRs fail repository checks, while shared branch names can cause one target’s bump PR to suppress another’s.
2 open issues
What changed in this PR
Automates the post-release SqlClientNextVersion bump by opening a GitHub PR against the branch used for an official production release.
Changes:
- Adds a pipeline stage gated on successful production publication of the SqlClient family.
- Implements version and milestone selection, branch validation, duplicate-PR detection, and dry-run support.
- Adds mocked Pester coverage and documents the automation.
| File | Description |
|---|---|
eng/pipelines/onebranch/stages/version-bump-pr-stage.yml |
Defines the gated post-release job and token mapping. |
eng/pipelines/onebranch/sqlclient-official.yml |
Includes the version-bump stage in the official pipeline. |
eng/pipelines/onebranch/scripts/tests/README.md |
Lists version-bump test coverage. |
eng/pipelines/onebranch/scripts/tests/new-version-bump-pr.Tests.ps1 |
Tests selection rules, safeguards, and mocked GitHub operations. |
eng/pipelines/onebranch/scripts/new-version-bump-pr.ps1 |
Implements version-bump PR creation through the GitHub API. |
.github/instructions/onebranch-pipeline-design.instructions.md |
Documents stage gating, selection rules, and credentials. |
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The milestone fallback can assign a closed or mismatched milestone, causing generated version-bump PRs to fail repository milestone checks and require manual repair.
No open issues 🎉
2 resolved since last review
Review effort: Balanced
This branch has not been deployed
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
After a production release,
SqlClientNextVersionhas to be bumped by hand on the branch the release came from. This adds a stage to the OneBranch official pipeline that opens that PR automatically.version-bump-pr-stage.ymlruns afterrelease_productionsucceeds. It is only added whenreleaseToProductionandreleaseSqlClientare both true.new-version-bump-pr.ps1uses the GitHub REST API withPATTokenfrom theGitHub PAT Tokensvariable group.mainandrelease/X.Yare allowed, with an optionalinternal/prefix. Other branches log a warning and are skipped.TF_BUILD). A local run must use-DryRun.How the next version is chosen:
release/*mainHow the PR milestone is chosen: the milestone that matches the new version exactly. If there isn't one, the closest earlier milestone, open or closed.
The script makes no change when:
Versions.propsis missing.Docs: updated
onebranch-pipeline-design.instructions.mdand the scripts test README.Issues
N/A
Testing
Invoke-Pester eng/pipelines/onebranch/scripts/tests/new-version-bump-pr.Tests.ps1: 41 passed, 0 failed. The tests cover the version and milestone rules, the branch allowlist, and the full flow with mocked GitHub calls.-DryRunagainst the live repo forinternal/mainandrelease/8.0. Both reported the PR they would open, with the right version and milestone.-DryRunfordev/*andrelease/7.1-hotfix. Both were skipped with a warning.-DryRunfailed as expected with "Only -DryRun is allowed outside an Azure DevOps build".Guidelines
Please review the contribution guidelines before submitting a pull request: