#github #owner

codeowners

Rust bindings for Github CODEOWNERS files

4 releases

Uses old Rust 2015

0.1.3 Nov 19, 2017
0.1.2 Nov 6, 2017
0.1.1 Jul 24, 2017
0.1.0 Jul 24, 2017

#1207 in Filesystem

Download history 210/week @ 2023-12-04 232/week @ 2023-12-11 180/week @ 2023-12-18 2/week @ 2023-12-25 101/week @ 2024-01-01 171/week @ 2024-01-08 114/week @ 2024-01-15 32/week @ 2024-01-22 148/week @ 2024-01-29 94/week @ 2024-02-05 139/week @ 2024-02-12 227/week @ 2024-02-19 258/week @ 2024-02-26 236/week @ 2024-03-04 263/week @ 2024-03-11 223/week @ 2024-03-18

988 downloads per month
Used in 3 crates

MIT license

18KB
347 lines

codeowners Build Status Coverage Status Software License crates.io

A Github CODEOWNERS answer sheet

Documentation

installation

Add the following to your Cargo.toml filter

[dependencies]
codeowners = "0.1"

Usage

Typical use involves resolving a CODEOWNERS file, parsing it, then querying target paths

extern crate codeowners;
use std::env;

fn main() {
  if let (Some(owners_file), Some(path)) =
     (env::args().nth(1), env::args().nth(2)) {
     let owners = codeowners::from_path(owners_file);
     match owners.of(&path) {
       None => println!("{} is up for adoption", path),
       Some(owners) => {
          for owner in owners {
            println!("{}", owner);
          }
       }
     }
  }
}

Doug Tangren (softprops) 2017

Dependencies

~3.5MB
~72K SLoC