Page MenuHomeVyOS Platform

Handle Mergify Backport Conflict Detection Reliably
Closed, ResolvedPublic

Description

Summary
Improve PR conflict detection to correctly identify Mergify backport PRs that contain committed conflict markers, which are not detected by GitHub’s native mergeability checks.

Problem
Mergify creates backport PRs where cherry-pick conflicts are committed as conflict markers (<<<<<<<, =======, >>>>>>>).
GitHub treats these PRs as mergeable, causing automation to incorrectly remove the conflicts label and allowing unsafe merges.

Change

Add conflict detection using gh pr diff to scan PR diffs for conflict markers.

Automatically add the conflicts label when markers are found.

Make the conflicts label sticky (do not auto-remove it).

Skip label changes when PR diff cannot be fetched (e.g., 404).

Acceptance Criteria

PRs containing conflict markers are consistently labeled conflicts.

conflicts label is not auto-removed by automation.

Clean PRs are unaffected.

No repository checkout required for detection.

Impact
Prevents false “mergeable” backport PRs from being merged with unresolved conflicts and aligns automation with Mergify behavior.

Details

Version
-
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

Vijayakumar renamed this task from Update PR conflict checker to check mergify conflicts to Handle Mergify Backport Conflict Detection Reliably.
Vijayakumar triaged this task as High priority.
Vijayakumar created this object in space S1 VyOS Public.