I have a GitHub organization. There are about 250 repositories belonging to different teams in this organization. I have admin access to the organization account. Is there a way I can use to search for a pattern in all these repositories, ideally via GitHub's web interface?
We are planning to update some .jar
file locations, but we need to know which code in these repositories is using the old locations.
Hitting https://api.github.com/users/USERNAME/repos will list public repositories for the user USERNAME. Show activity on this post. to find all the user's repos.
Of course, just do "filename:the-file-name" if you want to search the whole of GitHub. This is now documented on Github.
The `git grep` is a useful command for searching the specific content in the git repository. The searching can be done in different ways by using the different options of this command.
This is on a GitHub org within my company. I want to search at the org level from my browser or something like that since it can be painful to go through the 250 repos under this org.
If you navigate to your organization page
https://github.com/<organizationName>
you should see a search box in the header:
Once you submit a search, you may see on the main panel “ We couldn’t find any repositories matching 'organizationName query’”.
But you can switch from a repository search to a Code search using the side navigation bar:
This should build a URL something like
https://github.com/search?q=org%3A<organizationName>+<query>&type=Code
that finds instances of <query>
in repositories owned by your organization.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With