generate_codeowners

Function generate_codeowners 

Source
pub fn generate_codeowners(
    features: &[Feature],
    base_path: &Path,
    project_dir: Option<&Path>,
    output_dir: &Path,
) -> Result<()>
Expand description

Generate or update a CODEOWNERS file with feature ownership information.

§Arguments

  • features - List of features to generate CODEOWNERS entries for
  • base_path - Base path of the project (where features are located)
  • project_dir - Optional project directory to calculate relative paths
  • output_dir - Directory where the CODEOWNERS file should be created

§Behavior

  • Creates CODEOWNERS if it doesn’t exist
  • Updates existing CODEOWNERS while preserving custom content
  • Generated content is placed between section markers
  • Content outside markers is preserved
  • Paths are normalized with forward slashes and leading /
  • Owners automatically get @ prefix if not present