Skip to content

Automate SqlClient next-version bumps from milestones - #4767

Open
mdaigle wants to merge 1 commit into
mainfrom
dev/automation/bump-next-version-after-release
Open

mdaigle wants to merge 1 commit into
mainfrom
dev/automation/bump-next-version-after-release

Conversation

@mdaigle

@mdaigle mdaigle commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Description

SqlClientNextVersion currently requires manual updates after releases or changes to the milestone plan. This adds milestone-closure and weekly reconciliation automation to propose version-bump PRs against the owning branch (main or release/X.Y).

The automation selects the next open milestone in the series, creates a patch milestone after a closure if needed, and skips stale events and legacy branches. Weekly runs can move main to the next unbranched series after a release branch is cut, or update an existing automation PR when a preview is discarded. It does not overwrite unrelated PR changes. No public API or runtime behavior changes.

Generated PRs use GITHUB_TOKEN, so ordinary pull_request checks do not automatically trigger; a follow-up commit using a non-default token is needed before merging.

Issues

N/A

Testing

19 targeted Bats scenarios passed, covering branch routing, version selection, weekly reconciliation, duplicate/retry behavior, legacy branches, and failures. Bash syntax, workflow YAML parsing, and git diff --check passed. No live milestone or PR was created as a test.

Guidelines

Reviewed the repository contribution and versioning guidance; updated package-version instructions and script-test documentation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Note

This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Existing PR reconciliation fails after normal base-branch advancement and cannot recover from partial metadata-update failures.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)

Comment on lines +267 to +271
! git merge-base --is-ancestor "${target_sha}" FETCH_HEAD ||
[[ "$(git diff --name-only "${target_sha}" FETCH_HEAD)" != "${version_file}" ]] ||
! git show "${target_sha}:${version_file}" |
sed "s|<SqlClientNextVersion>${current_version}</SqlClientNextVersion>|<SqlClientNextVersion>${branch_version}</SqlClientNextVersion>|" |
cmp -s - <(git show "FETCH_HEAD:${version_file}"); then
Comment on lines +276 to +279
if [[ "${branch_version}" == "${next_version}" ]]; then
echo "::notice::Version-bump PR #${pr_number} already proposes ${next_version}."
exit 0
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script could use some intent/explanatory comments throughout!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting for customer

Development

Successfully merging this pull request may close these issues.

5 participants