Problem
When a pushed PR has merge conflicts, the webhook server still queues and runs all CI checks (tox, pre-commit, container build, python module install, conventional-title, security checks, custom checks). Running CI against an unmergeable state wastes compute, and the author gets no clear signal that they need to resolve conflicts.
Behavior
- On push/synchronize, determine conflict state via
pull_request.mergeable is False (existing detection in label_pull_request_by_merge_state).
- If the PR has conflicts:
- Add the
has-conflicts label (existing behavior).
- Skip all CI checks — do not queue or run any of them.
- Post a comment explaining why CI did not run and that resolving the conflicts (rebase/merge) will re-trigger checks on the next push.
- Dedup via the
has-conflicts label (no spam):
- The first conflicting push adds the label (absent→present) → post the comment.
- Subsequent conflicting pushes see the label already present → skip CI, no new comment.
- When conflicts clear: the
has-conflicts label is removed (existing behavior) and CI runs normally on the next push. If conflicts later reappear, the label was removed in between, so a fresh comment posts.
Done
Assisted-by: PI (gpt-5.6-luna)
Problem
When a pushed PR has merge conflicts, the webhook server still queues and runs all CI checks (tox, pre-commit, container build, python module install, conventional-title, security checks, custom checks). Running CI against an unmergeable state wastes compute, and the author gets no clear signal that they need to resolve conflicts.
Behavior
pull_request.mergeable is False(existing detection inlabel_pull_request_by_merge_state).has-conflictslabel (existing behavior).has-conflictslabel (no spam):has-conflictslabel is removed (existing behavior) and CI runs normally on the next push. If conflicts later reappear, the label was removed in between, so a fresh comment posts.Done
process_opened_or_synchronize_pull_requestskips all CI check queueing and runner tasks whenpull_request.mergeable is Falsehas-conflictslabel added on first conflicting push (existing transition logic reused)has-conflictslabel absent→present transition (present = already notified, no re-comment)Assisted-by: PI (gpt-5.6-luna)