In a github organization, how can I find all the code owners which match a pattern?

3.1k views Asked by At

In github, our organization has code-owners.

In the individual project I can

cat .github/CODEOWNERS

It says

# Code owners
*       @ourorg/projectname

How can I find all git repositories for the same owner within this org? which is ourorg/projectname

This will let me know which projects are owned by our squad

1

There are 1 answers

1
Xiang Rong Lin On BEST ANSWER

Update

You can use the github search function for it. Use org:<org-name> <teamname> path:CODEOWNERS as search query

Old answer This assumes you have all the repos checked out locally.

I ran the command from here in order to look through all the CODEOWNERS files and search for my teamname.

grep --include=CODEOWNERS -rw '.' -e "teamname"