Re:Github search sucks (and how it could be better)
by danpelota on Wednesday March 22, 2017 @09:23PM
(#13936730)
I would love to be able to search all code for a string and then either (1) sort the resulting repositories by stars/forks; or (2) limit the results to repositories with >X stars/forks. When learning a new framework or library I like to find popular projects that use it and read the code to get a sense of conventions, architecture, etc. For instance, it'd be fantastic to find all repositories with over 20 stars containing a *.py file with "import flask" or "from flask" in them.
[ Parent
| on HN ]
Re:Github search sucks (and how it could be better)
by hbt on Thursday March 23, 2017 @12:59AM
(#13937488)
all files ending with py with "import flask"
https://github.com/search?q=filename%3A%2A.py+%22import+flas...
use advanced search to specify stars:>20 etc.
Re:Github search sucks (and how it could be better)
by danpelota on Thursday March 23, 2017 @05:47AM
(#13938427)
Unfortunately, you can search code by file extension and phrase, and you can use advanced search to search for repository descriptions filtering by stars, but I don't believe you can do both at once.
For instance, searching for "flask" and limiting the results to >1000 stars returns only the 27 repositories with a matching description[0], but the code search returns over 4 million results, ignoring the stars parameter[1].
https://github.com/search?l=&q=flask+stars%3A%3E1000&ref=adv...
https://github.com/search?l=&q=flask+stars%3A%3E1000&ref=adv...
Re:Github search sucks (and how it could be better)
by chatmasta on Friday March 24, 2017 @09:18AM
(#13948685)
How would you build the search results UI for a grouped query like this? If one repository has 10k stars and has 1000 files with matching strings, should the first 1000 results be from the same repository?