fix(reviews): filter out PRs with merge conflicts#1020
Conversation
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
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 🤖 Continuous IntegrationWonderful, this rule succeeded.
🟢 👀 Review RequirementsWonderful, this rule succeeded.
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 ReviewsWonderful, this rule succeeded.
🟢 📕 PR descriptionWonderful, this rule succeeded.
|
There was a problem hiding this comment.
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
mergeablefield for each PR. - Filter out PRs whose
mergeablestate isCONFLICTINGwhen 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.
🧪 CI InsightsHere's what we observed from your CI run for 3a62396. 🟢 All jobs passed!But CI Insights is watching 👀 |
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
|
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