Skip to content

fix(reviews): filter out PRs with merge conflicts#1020

Merged
mergify[bot] merged 1 commit intomainfrom
devs/jd/worktree-review-conflict/Ic85deccbe0289123ccafd9fa9f5e4d4c192cf768
Mar 10, 2026
Merged

fix(reviews): filter out PRs with merge conflicts#1020
mergify[bot] merged 1 commit intomainfrom
devs/jd/worktree-review-conflict/Ic85deccbe0289123ccafd9fa9f5e4d4c192cf768

Conversation

@jd
Copy link
Member

@jd jd commented Mar 10, 2026

PRs in a CONFLICTING mergeable state are not useful to review, so
exclude them from the pending reviews list.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

PRs in a CONFLICTING mergeable state are not useful to review, so
exclude them from the pending reviews list.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change-Id: Ic85deccbe0289123ccafd9fa9f5e4d4c192cf768
Claude-Session-Id: d5572357-9198-403e-83f3-1c3d4cb73a99
Copilot AI review requested due to automatic review settings March 10, 2026 15:08
@mergify mergify bot deployed to Mergify Merge Protections March 10, 2026 15:08 Active
@mergify
Copy link
Contributor

mergify bot commented Mar 10, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 🤖 Continuous Integration

Wonderful, this rule succeeded.
  • all of:
    • check-success=ci-gate

🟢 👀 Review Requirements

Wonderful, this rule succeeded.
  • any of:
    • #approved-reviews-by>=2
    • author = dependabot[bot]
    • author = mergify-ci-bot
    • author = renovate[bot]

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?:

🟢 🔎 Reviews

Wonderful, this rule succeeded.
  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

Wonderful, this rule succeeded.
  • body ~= (?ms:.{48,})

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the “pending reviews” listing to exclude pull requests that are in GitHub’s CONFLICTING mergeable state, since those are not actionable for review in their current form.

Changes:

  • Extend the GitHub GraphQL query to request the mergeable field for each PR.
  • Filter out PRs whose mergeable state is CONFLICTING when building the pending review list.
  • Add a CLI test ensuring conflicting PRs are excluded and the “No PRs…” message is shown.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
mergify_cli/reviews/api.py Fetches mergeable via GraphQL and filters out CONFLICTING PRs during parsing.
mergify_cli/tests/reviews/test_cli.py Updates mocked GraphQL payloads to include mergeable and adds coverage for conflicting PR filtering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mergify mergify bot requested a review from a team March 10, 2026 15:10
@mergify mergify bot requested a review from a team March 10, 2026 15:12
@mergify
Copy link
Contributor

mergify bot commented Mar 10, 2026

🧪 CI Insights

Here's what we observed from your CI run for 3a62396.

🟢 All jobs passed!

But CI Insights is watching 👀

mergify bot added a commit that referenced this pull request Mar 10, 2026
@mergify
Copy link
Contributor

mergify bot commented Mar 10, 2026

Merge Queue Status

This pull request spent 2 minutes 52 seconds in the queue, including 2 minutes 27 seconds running CI.

Required conditions to merge

@mergify mergify bot added the queued label Mar 10, 2026
@mergify mergify bot merged commit 79fd8be into main Mar 10, 2026
14 checks passed
@mergify mergify bot deleted the devs/jd/worktree-review-conflict/Ic85deccbe0289123ccafd9fa9f5e4d4c192cf768 branch March 10, 2026 16:18
@mergify mergify bot removed the queued label Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants