Search all Git repositories in a GitHub organization for a pattern
Answer a question
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.
Answers
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.
更多推荐


所有评论(0)