Feature request: Add a search qualifier to filter pull requests with merge conflicts #214258
Replies: 2 comments
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
I agree that this would be a useful addition to GitHub's search qualifiers, especially for repositories with many active pull requests. As a practical workaround, GitHub CLI already exposes the gh pr list --state open --limit 1000 \
--json number,title,url,mergeable \
--jq '.[] | select(.mergeable == "CONFLICTING")'To find conflicting PRs targeting gh pr list --state open --base main --limit 1000 \
--json number,title,url,mergeable \
--jq '.[] | select(.mergeable == "CONFLICTING")'GitHub's GraphQL API already defines three mergeability states:
The I'd also distinguish merge conflicts from other merge blockers, such as failing CI checks, missing approvals and branch protection requirements. A PR without conflicts isn't necessarily eligible to merge. Since the underlying mergeability information is already exposed through the API, a native search qualifier would make this functionality considerably more accessible, although keeping search results synchronized with changing base branches could introduce additional complexity. References: The CLI workaround solves the immediate triage problem, but I agree that |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Product Feedback
Body
It would be very useful to have a dedicated search qualifier in GitHub Pull Request Search to filter PRs that have merge conflicts.
Proposed syntax:
is:conflicting— show pull requests with merge conflictsis:mergeable— optionally, show pull requests that can be merged cleanlyUse case:
When maintaining a repository with many open pull requests, it is difficult to quickly identify PRs that require conflict resolution. Currently, there is no native search qualifier to filter PRs based on their merge conflict status.
Being able to search using something like:
is:pr is:open is:conflictingwould make it much easier for maintainers to identify and prioritize PRs that need attention, without having to open each PR individually or rely on external scripts/API queries.
Expected benefit:
Thanks for considering this feature!
All reactions