Skip to content

ci: fail the build on unresolved merge-conflict markers - #3207

Merged
kazo0 merged 1 commit into
mainfrom
dev/sb/ci-conflict-markers
Oct 14, 2026
Merged

kazo0 merged 1 commit into
mainfrom
dev/sb/ci-conflict-markers

Conversation

@kazo0

@kazo0 kazo0 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

GitHub Issue (If applicable): n/a

PR Type

  • Build or CI related changes

What is the current behavior?

Mergify opens a backport PR even when its cherry-pick conflicts, and commits the <<<<<<< / >>>>>>> markers as-is. Nothing fails until the build chokes on them, deep in a long run.

What is the new behavior?

A new Conflict Markers stage scans the tree for unresolved conflict markers and fails in seconds, listing each file and line.

  • It runs on its own (dependsOn: []), so it does not wait on any other stage.
  • It scans the whole tree, not the diff, so markers already on the base branch are reported too.
  • ======= is not matched, because it is also a Markdown heading underline. Binary files are skipped.
  • The pipeline check is already required on this branch, so a failing stage blocks the PR. No branch-protection change is needed.

Other information

A PR runs the pipeline YAML from its target branch, so backport PRs are only protected once this stage is also on that release or servicing branch. That backport is a clean cherry-pick.

Tested locally: the scan passes on the current tree, and fails with both marker lines listed when a conflicted file is planted.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HYd7dbzNqeaaibH62FHLgc

- Mergify opens a backport PR even when its cherry-pick conflicts,
  committing the markers as-is; nothing fails until the build chokes
  on them
- New Conflict_Markers stage, independent of every other stage, greps
  the whole tree for `<<<<<<<` / `>>>>>>>` lines and fails in seconds
- Whole tree rather than the diff, so markers already on the base
  branch are reported by name on every PR into it
- Binary files are skipped (-I) so stray byte matches do not fail it

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HYd7dbzNqeaaibH62FHLgc
@kazo0

kazo0 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio backport servicing/7.4

@mergify

mergify Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

backport servicing/7.4

✅ Backports have been created

Details

@kazo0
kazo0 merged commit 8ffa38f into main Oct 14, 2026
25 of 26 checks passed
@kazo0
kazo0 deleted the dev/sb/ci-conflict-markers branch October 14, 2026 12:28
kazo0 added a commit that referenced this pull request Oct 26, 2026
…-3207

ci: fail the build on unresolved merge-conflict markers (backport #3207)
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.

1 participant