Skip to content

Document merge-commit requirement for release PRs - #4110

Open
redsun82 wants to merge 1 commit into
mainfrom
redsun82-release-merge-instructions
Open

Document merge-commit requirement for release PRs#4110
redsun82 wants to merge 1 commit into
mainfrom
redsun82-release-merge-instructions

Conversation

@redsun82

Copy link
Copy Markdown
Contributor

The release process creates a cascade of PRs (main -> releases/vN, then the releases/vN -> main mergeback, then a releases/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 an applyTo glob 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

  • Low risk: Documentation only.

Which use cases does this change impact?

Environments:

  • Testing/None - This change does not impact any CodeQL workflows in production.

How did/will you validate this change?

  • None - Documentation-only change; no runtime behavior is affected.

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

  • Development/testing only - This change cannot cause any failures in production.

How will you know if something goes wrong after this change is released?

  • Other - N/A, documentation-only change.

Are there any special considerations for merging or releasing this change?

  • No special considerations - This change can be merged at any time.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

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
Copilot AI balanced review requested due to automatic review settings August 26, 2026 15:13
@redsun82
redsun82 requested a review from a team as a code owner August 26, 2026 15:13

@henrymercer henrymercer 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.

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?

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.

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.

3 participants