I would like to write a script in Javascript to query all open github PRs in all repos in my org. I can use this URL to do it in a browser: https://my.github.server/pulls?q=is%3Aopen+is%3Apr+org%3Amy-org-name
.
But using octokit, I need to supply the name of the repo in which to search. It looks as if the github API also requires it, but like I said, the URL above doesn't supply a repo name and it works just fine.
The documented one also has /repos
at the beginning, which mine above does not. I can't find the one I'm using anywhere in the github API docs. If I try octokit.request( 'GET /pulls?q=...' )
as above, I get a 404.
I'm sure there's a way to list the repos and run the above search on each one, but I have dozens of repos, so that's likely to be much slower. Is there a way to do it in one request?