Summary
Add sync-backport-changelog.yml, a GitHub Actions workflow that automatically opens a PR against main to insert new changelog entries whenever any commit is pushed to a backport-<package>-* branch. This keeps main's package changelogs current without a manual step, for both automated and manually created backport PRs.
Background
When a fix lands on a backport branch, the changelog.yml entry for that version only exists on that branch. Without this workflow, the entry must be manually copied to main's changelog — a step that is easy to forget and causes the integrations site changelog to be incomplete or out of date.
This workflow is fully independent of the rest of the backport tooling: it requires no .backports.yml check, no active-branch evaluation, and no other script. If work was pushed to a backport branch, it should be synced regardless of the branch's inventory status.
Deliverables
sync-backport-changelog.yml
Trigger: push to branches matching backport-*
Permissions: contents: write, pull-requests: write
Flow:
- Zero-SHA guard: exit silently on branch-creation pushes (nothing to diff)
- Parse package name from branch name (
backport-<package>-<major.minor>) — exit silently if no match
- Diff
changelog.yml: git diff <before>..<after> -- packages/<package>/changelog.yml — exit silently if no changelog change
- Extract the new version entry from the diff (only
+ lines forming a complete version block, verified as valid YAML)
- Idempotency check: verify the version does not already exist in
main's changelog.yml — exit silently if it does
- Insert the entry at the correct semver-descending position in
main's changelog.yml
- Open PR: working branch
changelog-sync/<package>-<version>; deduplicate via gh pr list --head <working-branch> --state all; label automation to prevent auto-backport.yml re-triggering on merge
No active-branch check — if work was pushed to a backport branch, the changelog entry should be synced regardless of the branch's inventory status.
Considerations
- Nested package directories: step 3 diffs
packages/<package>/changelog.yml, but the package may live under packages/<technology>/<package>. The workflow must resolve the package name (parsed from the branch name) to its actual filesystem path. Investigate whether mage listPackages or an equivalent helper provides a name → path mapping, or whether a find-based lookup is needed.
Acceptance criteria
Summary
Add
sync-backport-changelog.yml, a GitHub Actions workflow that automatically opens a PR againstmainto insert new changelog entries whenever any commit is pushed to abackport-<package>-*branch. This keepsmain's package changelogs current without a manual step, for both automated and manually created backport PRs.Background
When a fix lands on a backport branch, the
changelog.ymlentry for that version only exists on that branch. Without this workflow, the entry must be manually copied tomain's changelog — a step that is easy to forget and causes the integrations site changelog to be incomplete or out of date.This workflow is fully independent of the rest of the backport tooling: it requires no
.backports.ymlcheck, no active-branch evaluation, and no other script. If work was pushed to a backport branch, it should be synced regardless of the branch's inventory status.Deliverables
sync-backport-changelog.ymlTrigger:
pushto branches matchingbackport-*Permissions:
contents: write,pull-requests: writeFlow:
backport-<package>-<major.minor>) — exit silently if no matchchangelog.yml:git diff <before>..<after> -- packages/<package>/changelog.yml— exit silently if no changelog change+lines forming a complete version block, verified as valid YAML)main'schangelog.yml— exit silently if it doesmain'schangelog.ymlchangelog-sync/<package>-<version>; deduplicate viagh pr list --head <working-branch> --state all; labelautomationto preventauto-backport.ymlre-triggering on mergeNo active-branch check — if work was pushed to a backport branch, the changelog entry should be synced regardless of the branch's inventory status.
Considerations
packages/<package>/changelog.yml, but the package may live underpackages/<technology>/<package>. The workflow must resolve the package name (parsed from the branch name) to its actual filesystem path. Investigate whethermage listPackagesor an equivalent helper provides a name → path mapping, or whether afind-based lookup is needed.Acceptance criteria
maininserting the new version entry at the correct semver-descending positionautomationand do not re-triggerauto-backport.ymlon mergeauto-backport.yml) and manually created backport PRspackages/<technology>/<package>)