0

Im trying to get list of repositories and pull requests where the author is selected user.

I tried out this

{
  user(login:"s8sachin"){
    repositories(first: 100){
      nodes{
        name
        pullRequests{
          totalCount // this gives me count of PR from all collaborators 
        }
      }
    }
  }
}

since this gives me PR count for all collaborators, im trying to get count by only "s8sachin"

is there a way to achieve that ? please help me. thanks

1 Answers1

0

There's no way to do that right now, but you can make a schema request at https://platform.github.community/c/graphql-api with the schema-request tag. Ideally it'd be an authoredBy argument on the pullRequests connection:

query($owner:String!,$name:String!,$authoredBy:String!) {
  repository(owner:$owner,name:$name) {
    pullRequests(authoredBy:$login) {
      totalCount
    }
  }
}
bswinnerton
  • 4,533
  • 8
  • 41
  • 56