Document merge-commit requirement for release PRs - #4110
Open
redsun82 wants to merge 1 commit into
Open
Conversation
Release, mergeback, and backport PRs must be merged with a merge commit so the branch linkage the release automation depends on is preserved (the mergeback tags the release using the merge commit of the "Merge main into releases/vN" PR, so squashing or rebasing breaks tagging). Add a path-scoped Copilot instructions file scoped to the files that reliably change in these PRs (CHANGELOG.md, src/defaults.json, lib/defaults.json, src/api-compatibility.json), and add an explicit note to the Releasing runbook in CONTRIBUTING.md so the rule is enforced regardless of who merges. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0dae6e42-7fc6-4fb1-b1ea-15dc17e402a2
henrymercer
approved these changes
Aug 26, 2026
henrymercer
left a comment
Contributor
There was a problem hiding this comment.
Changes to CONTRIBUTING.md make sense. Is there a risk that the applyTo filter for the instructions will mean that the agent doesn't see them when interacting with the release process more indirectly?
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.
The release process creates a cascade of PRs (
main->releases/vN, then thereleases/vN->mainmergeback, then areleases/vN->releases/v(N-1)backport). These must be merged with a merge commit: the mergeback tags the release using the merge commit of the "Merge main into releases/vN" PR, so squashing or rebasing breaks tagging and the branch linkage the release automation relies on. Today nothing in the repo states this, so it depends on whoever clicks merge remembering the right strategy.This PR bakes the rule into two places:
.github/instructions/release-merge.instructions.md(new) - a path-scoped Copilot instructions file with anapplyToglob targeting the files that reliably change in release/mergeback/backport PRs (CHANGELOG.md,src/defaults.json,lib/defaults.json,src/api-compatibility.json). It tells the agent to merge with a merge commit and arm auto-merge with--merge.CONTRIBUTING.md- the human-facing Releasing runbook. Both automerge steps now say to merge "with a merge commit (gh pr merge --merge)", plus a> [!NOTE]explaining why squash/rebase would break tagging.Docs-only change; no behavior or code paths are affected.
Risk assessment
Which use cases does this change impact?
Environments:
How did/will you validate this change?
If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist