github-exporter icon indicating copy to clipboard operation
github-exporter copied to clipboard

Feature request - list open pull requests

Open bastelfreak opened this issue 8 years ago • 4 comments

Hi everybody, thanks for the great work! Do you think it is possible to also track the amount of open pull requests?

bastelfreak avatar Mar 08 '17 00:03 bastelfreak

@bastelfreak yes in effect. This should be possible via the /pulls API i.e. https://api.github.com/repos/alexellis/faas/pulls

The only issue is that the endpoint will be a list / iterative and could burn up a lot of API calls.

alexellis avatar Mar 25 '17 22:03 alexellis

Pulls API - Very frustrating. It doesn't always seem to exist, but when it does it contains all the standard info. If it was reliable we could capture the data without hitting the rate limits. Open to thoughts on how best to achieve.

Rucknar avatar May 04 '17 16:05 Rucknar

Has anyone looked at using the graphql api for this? Something like this could could work...

query { 
  organization(login: "some-org") {
    repositories(first:100) {
     nodes {
      name
      openPullRequests: pullRequests(states:OPEN) {
        totalCount
      }
      closedPullRequests: pullRequests(states:CLOSED) {
        totalCount
      }
      mergedPullRequests: pullRequests(states:MERGED) {
        totalCount
      }
    } 
    }
  }
}

smithamax avatar Jul 05 '17 15:07 smithamax

Indeed, mentioned it just the other day on issue #22 I've not got time this month, open to a PR though if it's something you are familiar with!

Rucknar avatar Jul 05 '17 15:07 Rucknar