azure/azsdk-common-patch-mergeback
Prepare a merge-back PR that brings patch-release version, CHANGELOG, and pom.xml updates from a `release/patch/YYYYMMDD` branch back into `main`. **WORKFLOW SKILL**. USE FOR: "merge-back PR", "merge back patches", "patch release merge-back", "bring patch releases into main", "reconcile release/patch branch with main". DO NOT USE FOR: triggering SDK releases, incrementing versions for a new patch, general SDK code generation. INVOKES: eng/versioning/update_versions.py.
npx skills add https://github.com/Azure/azure-sdk-for-java --skill azsdk-common-patch-mergeback
Prepare a PR that merges the version, CHANGELOG, and downstream pom.xml
updates produced by a patch release (on a release/patch/YYYYMMDD branch) back
into main. Patches revert CHANGELOG.md and version files to the last stable
release, so a naive merge creates many conflicts. This skill encodes how to
resolve each file type correctly.
WHEN: "merge-back PR", "merge back patches", "patch release merge-back", "bring patch releases into main", "reconcile the patch branch"
DO NOT USE FOR: triggering an SDK release, incrementing versions for a new patch cycle, code generation.
Two values drive the whole workflow. Both come from the **"Increment versions
for patch releases"** PR (opened by azure-sdk-automation[bot]) that targets the
patch branch:
| Variable | How to determine it | Current value |
| ---------------- | ------------------------------------------------------------------------------- | ----------------------- |
| RELEASE_BRANCH | The branch the "Increment versions" PR targets: release/patch/YYYYMMDD. | release/patch/20260701 |
| PATCH_DATE | Derived from the branch name YYYYMMDD → YYYY-MM-DD. Used in CHANGELOG entries. | 2026-07-01 |
If either value is ambiguous, ask the user to confirm before proceeding.
RELEASE_BRANCH carry the updates to bringback. Diff against RELEASE_BRANCH~2 to scope the change set.
pom.xml by hand. It is regenerated byeng/versioning/update_versions.py after version_client.txt is correct.
README.md files. Run the version script with --skip-readmeso READMEs are left unchanged (README updates are handled separately).
version_client.txt: update only the dependency-version of SDKlibraries that changed on the release branch; **always keep the
current-version from main.** Never reset beta versions to beta.1.
CHANGELOG.md: keep the PATCH_DATE entry from the release branch; everyother line must match main. Do not invent or edit any other CHANGELOG
content.
main, not on the release branch.RELEASE_BRANCH and PATCH_DATE (see tableabove). Fetch the branch: git fetch origin RELEASE_BRANCH.
main:git checkout main && git pull then
git checkout -b copilot/merge-back-release-patch-YYYYMMDD.
git diff --name-only origin/RELEASE_BRANCH~2 origin/RELEASE_BRANCH.
Expect three kinds: eng/versioning/version_client.txt, many CHANGELOG.md,
and many pom.xml (+ possibly README.md).
version_client.txt — Followreferences/version-client-resolution.md.
CHANGELOG.md — Followreferences/changelog-resolution.md.
pom.xml — From the repo root run the version script with the--skip-readme (--sr) flag so README.md files are left untouched:
python eng/versioning/update_versions.py --skip-readme
Do not stage any manual pom.xml edits; only the generated output. Confirm no
README.md files appear in the resulting diff.
*-v2) or unrelated libraries weretouched, no current-version values were altered, and no beta version was
reset to beta.1.
main — Title it like<Month> <Year> Patches Merge-back. Summarize: bumped dependency versions,
inserted PATCH_DATE CHANGELOG entries, and auto-generated pom.xml updates
(READMEs intentionally left unchanged via --skip-readme).
release/patch/20260701 into main."current-version mismatch after regeneration (e.g. 2.59.0-beta.1 vs2.59.0-beta.2): you likely overwrote a current-version. Restore it from
main; only dependency-version should change.
update_versions.py only afterversion_client.txt is fully correct; stray diffs usually mean the version
file still has a wrong entry.
the patched GA/beta libraries listed in the release branch diff.
## X.Y.Z (PATCH_DATE) dependencybullets: correct them to match the actual previous release, per the release
branch entry.
Take azure/azsdk-common-patch-mergeback from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.