Skip to content

fix(next-reset): auto-resolve version-only conflicts when merging a hotfix into next - #335

Merged
Shinrai merged 1 commit into
nextfrom
fix/hotfix-merge-version-conflict
Sep 28, 2026
Merged

Shinrai merged 1 commit into
nextfrom
fix/hotfix-merge-version-conflict

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

🚀 What's Changed

💥 Breaking Changes

No breaking changes

✨ Features

No new features

🐛 Bug Fixes

  • fix(next-reset): auto-resolve version-only conflicts when merging a hotfix into next (e1cfc7c)

📦 Dependencies

No dependency updates

🔧 Other Changes

No other changes

👥 Contributors

…otfix into next

After a hotfix release, merge-master-into-branch merges master into next
through the Merges API. When next has a pending release, both sides changed
the same "version" lines (next-release bumped next to e.g. 0.4.0, the hotfix
bumped master to 0.3.3), so the API returned 409 every time. The step then
failed and the persistent next -> master release PR stayed conflicted.

On a 409 the action now redoes the merge locally with `git merge-tree`, which
leaves the working tree and index alone. If the only conflicts are content
conflicts in the root package.json / package-lock.json, and the two one-sided
resolutions differ only at `version` (plus `packages[""].version` in the
lockfile), it keeps the target branch's version. It then publishes the
two-parent merge commit through the Git Data API: blobs, then a tree that is
checked against the locally built one, then the commit, then a fast-forward
ref update. GitHub signs that commit for the bot App, and the App's ruleset
bypass applies, the same as for the Merges API commit. Any other conflict
still fails the step.

The tests are modelled on the gh-broker conflict (master 0.3.3 vs next
0.4.0). They run against real throwaway repos, with a stub API that replays
the Git Data calls locally. The test file is now part of `npm test`.

Fixes #334
@cldmv-bot cldmv-bot Bot added ! fix → next v4 flow: fix contributor PR targeting the next integration branch area: core Touches core library / runtime source code type: ci Changes to CI workflows, actions, or build pipelines type: config Changes to repository or project configuration files type: documentation Relates to docs, README updates, guides, or inline code comments labels Sep 28, 2026
@Shinrai

Shinrai commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Resolves #334 — closed when this ships to the default branch.

@Shinrai
Shinrai merged commit bddee92 into next Sep 28, 2026
17 checks passed
@cldmv-bot
cldmv-bot Bot deleted the fix/hotfix-merge-version-conflict branch September 28, 2026 16:07
cldmv-bot Bot added a commit that referenced this pull request Sep 28, 2026
## 🚀 What's Changed

### 💥 Breaking Changes
_No breaking changes_

### ✨ Features
_No new features_

### 🐛 Bug Fixes
- #335
  - fix(next-reset): auto-resolve version-only conflicts when merging a hotfix into next (e1cfc7c)

- #332
  - fix(stale): add a `pinned` label that exempts issues from the stale sweep (1e6882a)

### 📦 Dependencies
_No dependency updates_

### 🔧 Other Changes
_No other changes_



<details>
<summary>👥 Contributors</summary>

- @Shinrai

</details>

<!-- co-authors -->

Co-authored-by: Shinrai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Touches core library / runtime source code ! fix → next v4 flow: fix contributor PR targeting the next integration branch type: ci Changes to CI workflows, actions, or build pipelines type: config Changes to repository or project configuration files type: documentation Relates to docs, README updates, guides, or inline code comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant