Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub : Is it possible to search inside code and sort by stars

Tags:

I'm not sure if this is the right forum for this question. Saw quite a few Q&A related to search on GitHub, hence posting here. E.g. Search code inside a Github project

GitHub advanced search allows terms like stars:>100 but the query term is restricted to repository names only. Is it possible to search for a term inside the files (code) & sort by stars? My aim is to see which popular repos are using a particular keyword in their code. It would be very useful if GitHub's advanced search options for Repositories worked for Code also.

like image 458
user Avatar asked Jun 08 '14 19:06

user


People also ask

Do GitHub stars mean anything?

Particularly, GitHub users can star a repository, presumably to manifest interest or satisfaction with an open source project. However, the real and practical meaning of starring a project was never the subject of an in- depth and well-founded empirical investigation.

How do I search the contents of a file in GitHub?

You can search for a file in a repository using the file finder. To search for a file in multiple repositories on GitHub Enterprise Cloud, use the filename code search qualifier.


1 Answers

It is not possible to sort by stars when searching inside code.

From an e-mail from github.com support:

Code search does not support sorting by number of stars, but I will definitely add your +1 to that suggestion internally! I can't say if or when a change will happen, but your feedback is in the right hands.


You may want to vote for this feature: Add Stars count filter.
The feedback is related to this announcement: Improving GitHub code search

like image 82
Andrei Damian-Fekete Avatar answered Nov 08 '22 00:11

Andrei Damian-Fekete