githubgithub-codeowners

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


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


Solution

  • 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"