feat: add failOnConflicts and conflictLabel options for better conflict handling#550
Open
kapral18 wants to merge 1 commit intosorenlouv:mainfrom
Open
feat: add failOnConflicts and conflictLabel options for better conflict handling#550kapral18 wants to merge 1 commit intosorenlouv:mainfrom
kapral18 wants to merge 1 commit intosorenlouv:mainfrom
Conversation
…ct handling Adds two new options to improve handling of merge conflicts when using commitConflicts mode: - failOnConflicts (default: true): Exit with code 1 when PRs are created with conflicts in non-interactive mode, making conflicts visible in CI - conflictLabel (default: "merge-conflict"): Customizable label to automatically add to PRs with conflicts This ensures GitHub Actions show as FAILED (red) when conflicts occur, even though a PR is successfully created, preventing conflicts from being overlooked. Partially addresses: sorenlouv#447 (comment)
f29f56b to
9448dcd
Compare
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.
Summary
Adds two new configuration options to improve conflict visibility when using
commitConflicts: true:failOnConflicts(default:true): Controls exit code behavior when PRs are created with conflictsconflictLabel(default:"merge-conflict"): Customizable label automatically added to PRs with conflictsMotivation
When
commitConflicts: true, backport creates PRs even with merge conflicts. However, the process exits with code 0, causing GitHub Actions to show as SUCCESS (green). This makes it easy to overlook PRs that need manual conflict resolution.Partially addresses: #447 (comment)
Changes
failOnConflictsoption that causes the process to exit with code 1 when conflicts are detected (only in non-interactive mode withcommitConflicts: true)conflictLabeloption to customize the label added to conflicted PRshasConflictsflag for each resultBehavior
With
commitConflicts: trueANDfailOnConflicts: true(default):With
commitConflicts: trueANDfailOnConflicts: false:Test plan