Feature request - list open pull requests
Hi everybody, thanks for the great work! Do you think it is possible to also track the amount of open pull requests?
@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.
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.
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
}
}
}
}
}
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!