Skip to content

feat: skip all CI checks and comment once when PR has merge conflicts #1208

Closed

Description

@rnetser

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.

Accepted design

Every webhook delivery that definitively detects merge conflicts posts a conflict notification comment. Repeated comments are intentional audit/tracking events showing that pushes continue while conflicts remain. No comment-marker lookup or deduplication is performed.

This explicitly resolves the Qodo repeated/concurrent-comment finding: repeated and concurrent conflict notifications are an accepted, documented requirement rather than a defect.

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 conflict notification comment for every webhook delivery that definitively detects the conflicts, explaining why CI did not run and that resolving the conflicts (rebase/merge) will re-trigger checks on the next push.
  • When conflicts clear, the has-conflicts label is removed (existing behavior) and CI runs normally on the next push. If conflicts later reappear, conflict notification comments resume for each qualifying webhook delivery.

Done

  • process_opened_or_synchronize_pull_request skips all CI check queueing and runner tasks when pull_request.mergeable is False
  • has-conflicts label added when conflicts are detected (existing transition logic reused)
  • A conflict notification comment is posted for every webhook delivery that definitively detects conflicts
  • No comment-marker lookup or comment deduplication is performed
  • Comment text explains CI was skipped due to merge conflicts and that resolving them re-triggers checks
  • Unit tests cover conflicting deliveries (including repeated/concurrent deliveries), no-conflict pushes, and normal CI behavior after conflicts clear
  • docs/ regenerated via docsfy (or deferred to a follow-up issue if docsfy is unavailable)

Assisted-by: PI (gpt-5.6-luna)

Activity

  1. changed the title [-]fix: skip reviewer auto-assignment on invalid diff state (force-push/conflicts) to prevent reviewer explosion[/-] [+]feat: skip all CI checks and comment once when PR has merge conflicts[/+] on Sep 2, 2026
  2. added 5 commits that reference this issue on Sep 13, 2026
    d92021c
    551f637
    9a3967e
    1fee201
    0b7880c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions