Skip to main content

find_codeowners

Function find_codeowners 

Source
pub fn find_codeowners(start: &Path) -> Option<PathBuf>
Expand description

Locate a CODEOWNERS file by walking up from start, checking .github/CODEOWNERS, CODEOWNERS, and docs/CODEOWNERS at each level.

These are the three locations GitHub recognizes, checked in the same priority order as git’s own CODEOWNERS resolution.

§Example

use std::path::Path;
use codeowners_parser::find_codeowners;

if let Some(path) = find_codeowners(Path::new(".")) {
    println!("Found CODEOWNERS at {}", path.display());
}