max-mapper / max-mapper/open-prs
More efficient algorithm using issue search and the org:name filter
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 26
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Current algorithm (for reference):
- Get all repos for a user (handles pagination)
- Get all orgs for a user
- For each org, loop through all repos in that org (handles pagination)
- For each repo, if the user can push to it, collect that repo
- For each repo from both the user and the users orgs, get all pull requests, filter by open (handles pagination)
- Finally, we have all open pull requests that the user can merge
Proposed algorithm
- Get all repos for a user (handles pagination)
- Get all orgs for a user
- Perform an issue search using the
repo:<reponame>filter. (And thetype:pr is:openfilters of course.) It's paginated by 100 results. - Perform an issue search using the apparently undocumented
org:<orgname>filter. This filter appears to be cumulative i.e.org:phonegap org:nodejsreturns the set of PRs for phonegap union nodejs, so we can search for all open PRs across all repos of all relevant organisations at once. - Manually parse out the repo from the
html_urlproperty:https://github.com/nodejs/io.js/pull/2093as there is norepofield or link on the result object itself. - For each repo, if the user can push to it, collect that repo
- Filter PRs from steps 3 and 4 using repos from step 6.
- Done.
This is somewhat more complex and may only work with public repos, but it should decrease the number of requests needed.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the current repository/org enumeration and pull-request retrieval entry points described in the issue, then review GitHub issue search with the repo:, org:, type:pr, and is:open filters. Check pagination, pull-request repository extraction from html_url, and push-permission filtering, while comparing request counts for public repositories.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, javascript
- Domain
- api, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100