Skip to content

How do I search for PRs with conflicts? #23152

Discussion options

You must be logged in to vote

@aaronfranke - Great question! There’s not a specific qualifier in our search interface that would allow you to fetch a list of pull requests and filtering them for those with conflicting files.

One alternative approach that might be of interest is using our GraphQL API to fetch a list of pull requests and obtaining their number, URL and mergeable value. The mergeable field can be one of three values, where CONFLICTING would indicate that the pull request can’t be merged due to merge conflicts.

Here’s an example using the github/linguist repository:

query {
  repository(owner:"github", name:"linguist") {
    pullRequests(last: 10) {
      edges {
        node {
          number
          …

Replies: 9 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@jyn514
Comment options

@ferdnyc
Comment options

@ferdnyc
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants