29

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.

Community
  • 1
  • 1
user
  • 17,781
  • 20
  • 98
  • 124

1 Answers1

21

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

Andrei Damian-Fekete
  • 1,820
  • 21
  • 27
  • 1
    that is a shame. Not only one, but two reasons: a) it is basic functional requirement to sort hundreds of result by some quality rank. b) As for any result item, there is a single star number attribute, and it is simple to get, there is no technical difficulty to do this. – g.pickardou May 04 '22 at 05:05