Skip to content

Report the verified base-conflict reason when Mergify dequeues a PR #1465

Done

Description

@eowca

Current message

PR #7 left Mergify queue main unmerged. Mergify report: <comment>. Read Mergify's "Left the queue" comment on the PR for the reason. Address it before requeueing. To requeue, post @mergifyio queue …

At

reason = payload.get("dequeue_reason")
the already-validated departure payload contains dequeue_reason.code, but the parser retains only check names and attribution. At
def _mergify_departure_hint(report: mergify.Departure | None) -> str:
a base conflict gets generic recovery even though the report identifies a deterministic reason. #616 counted six conflict dequeues in its sample. #1152 is a later example. This follows #1357's report attribution work. #1293 covers pre-admission budget checks.

Reproducer

In the Mergify comment fixture, return a current queue command and a bot report tied to that command and the current head. Set dequeue_reason.code to CONFLICT_WITH_BASE_BRANCH with no failing checks. Resume a confirmed departure with loopzero merge --wait. The parser accepts the report, but the refusal never says the branch conflicts with its base.

Proposed wording

“PR #7 left Mergify queue main because it conflicts with main. Run git fetch origin main and resolve the base integration according to the PR's review state. Requeue only after the conflict is resolved. Mergify report: .”

Acceptance

  • A verified current base-conflict report names the target, gives the next integration step, and makes clear an unchanged requeue is useless.
  • Existing isolated and stacked check-failure guidance remains intact. Unknown, stale, or unverified reports retain the existing fallback.
  • Keep the existing attempt verification, queue behavior, and exit codes.

Activity

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