Skip to main content

get_repo_root

Function get_repo_root 

Source
pub fn get_repo_root(codeowners_path: &Path, fallback: &Path) -> PathBuf
Expand description

Get the repository root from a CODEOWNERS file path.

.github/CODEOWNERS and docs/CODEOWNERS live one directory below the repo root; a top-level CODEOWNERS sits at the root itself. If the parent cannot be determined, fallback is returned.