Retrieves the CODEOWNERS file for each repository in the input. The function searches all valid CODEOWNERS locations within each repository using the internal helper [gh_get_file].
Usage
get_codeowners(repos, org, token = get_token())Value
A named list where each element contains: * the raw GitHub API response for the CODEOWNERS file, or * `NULL` if no CODEOWNERS file exists.
Details
GitHub allows CODEOWNERS files to be stored in multiple locations. This function checks all valid paths and returns the first match. If no CODEOWNERS file exists for a repository, the corresponding list element is `NULL`.
Examples
if (FALSE) { # \dontrun{
my_repos <- get_repos("my-org") |> tidy_repos()
get_codeowners(org = "my-org", repos = my_repos)
} # }