This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Be smarter about the repository list we download#2148
Merged
Conversation
Limit the number of repositories displayed for each org to the 100 most recently pushed ones. This should stop organizations with 1000s of repositories from having a disproportional impact on the load time.
Explanation by @nicksnyder: Before this change, the affiliations field was overloaded to mean both the affiliations that the viewer had with the specified repositories, as well as the affiliations between the user that the connection was operating on. This caused a host of issues in various places, and we opted to separate them out to allow for more flexibility. In order to fix the above, the proper behavior would be to pass the full list of arguments to both connections (affiliations and ownerAffiliations), which should provide you all of the possible repositories. https://platform.github.9909958.xyzmunity/t/unable-to-fetch-users-repositories-by-organization-membership/7557/6
grokys
approved these changes
Jan 3, 2019
Contributor
grokys
left a comment
There was a problem hiding this comment.
I think this makes sense. We could improve this by paging in more results and updating the UI dynamically, and by caching but i think this makes sense for now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOTE: Show repositories user has contributed to in Clone/Open dialog
This PR is intended as a low impact fix for the
Open from GitHubdialog when the user belongs to an organization that owns 1000s of repositories.What this PR does
Rational
When github.com displays a list of repositories for a user or organization, the repositories are ordered starting with the one with the most recent commit. This ensures that the freshest repositories, which are most likely to be of interest to the user appear at the top of the list.
A user might have worked on a repository that doesn't appear on their organization's list of 100 repositories with recent commits. To ensure that these repositories are also visible, the list of repositories that the user has contributed to has also been included in this list. This includes repositories they created, committed to, opened an issue on or sent a pull request to.
If a user wants to clone a repository that they don't own, isn't on the top 100 active list and they haven't contributed to, they always have the option to open it using the URL tab (like they would for a 3rd party public repository).
What to expect
githubon their organization list (githubandMicrosoftboth have well over 2000 repositories)Before:
After:
https://github.com/<owner>view on github.com)Contributed to repositorieslistQuestions
100 most recently pushedtoo literal? Would100 most recently updatedbe better?Fixes #2143