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
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.