3

Our repositories are divided into communities (also called Organizations) in GitHub Enterprise. There are, for example, the BlueMeanies and the YellowSubmarines organizations. Each of these organizations has perhaps a dozen repos, e.g. YellowSubmarines/WhiteAlbum, YellowSubmarines/AbbeyRoad, ...

What I would like to do is

Search: screendoors in:code repo:YellowSubmarines/* extension:sh

That is, to find all files containing the text screendoors in all of the repositories in the YellowSubmarines organization. I do not want to see results from other organizations.

Ideally I'd like to limit the match to "sh" (bash) scripts files as well.

Of course the above syntax doesn't work thus this question.

Any solution is accepted, including using the API.

  • Please provide code examples, we don't do your homework but are happy to help you as soon as you put effort into your question. –  Sep 06 '15 at 16:20

1 Answers1

2

The user: qualifier searches both users and orgs. (ref: Search within a user's or organization's repositories)

Therefore:

user:YellowSubmarines extension:sh screendoors

is valid. You will need to click on "Code" on the results screen to specifically see the code results, as it defaults to the "Repositories" view.

I have tested this answer using GitHub Enterprise 2.1.11

busse
  • 1,761
  • 14
  • 25