Search code examples
github-apipygithub

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


https://help.github.com/en/articles/about-code-owners

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, GitHub API v3: Determine if user is an Owner of an Organization

But that seems to be answering a slightly different question.


Solution

  • For those whoever get stuck in this situation and can't use that library^, I managed to find a work around where I use .search_issues() and then query repo:x+review:approved+is:open+is:pr, the review does not switch to approved until a Codeowner has approved the PR.