Repository navigation
fix(next-reset): auto-resolve version-only conflicts when merging a hotfix into next - #335
Merged
Merged
Conversation
…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
Contributor
|
Resolves #334 — closed when this ships to the default branch. |
Shinrai
approved these changes
Sep 28, 2026
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]>
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.
🚀 What's Changed
💥 Breaking Changes
No breaking changes
✨ Features
No new features
🐛 Bug Fixes
📦 Dependencies
No dependency updates
🔧 Other Changes
No other changes
👥 Contributors