Skip to content

Use "per_page=100" query parameter#39

Closed
tporadowski wants to merge 1 commit intoSomsubhra:masterfrom
tporadowski:patch-1
Closed

Use "per_page=100" query parameter#39
tporadowski wants to merge 1 commit intoSomsubhra:masterfrom
tporadowski:patch-1

Conversation

@tporadowski
Copy link
Copy Markdown

When searching for user's repositories - append "per_page=100" query parameter to get a better overview on available repositories, otherwise only a default number is returned (I guess around 30). For instance without it - a very popular "antrirez/redis" does not show up in lookup list. This is not an ideal solution, but uses the maximum available value for "per_page" without introducing real paging/querying for repositories in some other way.

When searching for user's repositories - append "per_page=100" query parameter to get a better overview on available repositories, otherwise only a default number is returned (I guess around 30). For instance without it - a very popular "antrirez/redis" does not show up in lookup list. This is not an ideal solution, but uses the maximum available value for "per_page" without introducing real paging/querying for repositories in some other way.
@tooomm
Copy link
Copy Markdown

tooomm commented Feb 5, 2018

Are you sure this is working? @tporadowski
https://github.com/nodejs/node/releases has over 400 releases

Using your code and appending &per_page=100
https://rawgit.com/tporadowski/github-release-stats/patch-1/index.html?username=nodejs&repository=node&per_page=100
still shows the same releases up to v6.11.3 as the main page:
http://www.somsubhra.com/github-release-stats/?username=nodejs&repository=node

@tporadowski
Copy link
Copy Markdown
Author

Hi @tooomm,

It is working, but you apparently misunderstood my comment - "per_page=100" is added to call that searches for repositories of given Github user and later on offers them in lookup list when you start typing in the second text box. It's not about number of releases shown as result.

Regards,
Tomasz

@tooomm
Copy link
Copy Markdown

tooomm commented Feb 5, 2018

Indeed, I totally misunderstood it. 😄

It somewhat fixes #40 which i just filed....
But in this example the nodejs org has 130 repos, so I assume that's why repos like docker-node which used to show up aren't displayed anymore? Or maybe there is a limit to only display 8 results?
untitled

@tporadowski
Copy link
Copy Markdown
Author

Yes, it helps a lot to solve #40, though as I stated - a full paging solution would be needed as this one works for up to 100 repos.
Regarding typeahead Bootstrap plugin used - yes, it by default shows 8 matched items and "docker-node" is not listed as matched items are sorted into 3 groups: "starts with", "matches case-sensitive", "matches case-insensitive". So when you start typing "docker" then "docker-node" shows up :)

@Somsubhra
Copy link
Copy Markdown
Owner

Closing this since it is fixed with #49

@Somsubhra Somsubhra closed this Nov 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants