Anyway for GitHub api v3 to determine and give names of CODEOWNERS

From the above documentation I’m trying to determine code and file owners of a particular file. I haven’t been able to find anything that gives this information within the GitHub documentation.

The closest I found was this,

But that seems to be answering a slightly different question.


I've built an npm library called codeowners-api which does this . So its not python but in JS.

If you want to use REST you would need to fetch the codeowners file from the Repo in question using Github's get-file API.

After that you take the file and you iterate over the codeowners file until you find the match. You can look at my library's code as reference.

I've also created a chrome extension which gives the reviewer a filter button to see only their relevant files.

Posted on by orepor

Relevant tags