Skip to content

Automate branch setup and add verification in backport-changes skill#7222

Open
lbussell wants to merge 9 commits into
dotnet:nightlyfrom
lbussell:update-backport-skill
Open

Automate branch setup and add verification in backport-changes skill#7222
lbussell wants to merge 9 commits into
dotnet:nightlyfrom
lbussell:update-backport-skill

Conversation

@lbussell
Copy link
Copy Markdown
Member

@lbussell lbussell commented Jun 5, 2026

This PR improves the backport-changes skill by making the process more automated.

  • Automated working-branch setup. New New-BackportBranch.ps1 creates a working branch off the latest release branch (or a specified one), replacing the old manual steps.
  • Backport verification. New Get-BackportDiff.ps1 diffs HEAD against nightly, and a new "Expected divergences from nightly" section in SKILL.md explains how to triage the result so real missed backports stand out from expected drift.
  • Draft PR + label cleanup. The workflow now requires a draft PR (using pr-body-template.md) with full-changeset confirmation, plus Remove-BackportLabels.ps1 to clear needs-backport from handled PRs.
  • Shared git helpers. Moved Get-RemoteName into a new shared/GitHelpers.ps1 and added helpers for resolving the public remote and latest release branch.
  • Guideline fixes. Don't backport merge commits; corrected eng/common to eng/docker-tools.

lbussell and others added 9 commits June 5, 2026 08:49
Add post-cherry-pick verification (Get-BackportDiff.ps1, diffs HEAD against
nightly), label cleanup (Remove-BackportLabels.ps1), expected-divergence
guidance, explicit PR step, and a merge-commit guideline to the workflow.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add pr-body-template.md and document the PR title format
(Backport changes from nightly to \) in the workflow.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Create the working branch as step 2 (right after determining the release
branch), and move plan confirmation to the cherry-pick step.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@lbussell lbussell requested a review from a team as a code owner June 5, 2026 18:49
# than a possibly-stale local branch.
function Get-LatestPublicReleaseBranch {
$remote = Get-PublicRemoteName
git fetch $remote 2>&1 | Out-Null
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why are failures ignored here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Just an AI-ism... let me comb over the scripts more carefully and then I'll re-request review.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants