#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

#1203 in Filesystem

Download history 290/week @ 2024-03-14 192/week @ 2024-03-21 303/week @ 2024-03-28 226/week @ 2024-04-04 426/week @ 2024-04-11 368/week @ 2024-04-18 401/week @ 2024-04-25 327/week @ 2024-05-02 257/week @ 2024-05-09 304/week @ 2024-05-16 223/week @ 2024-05-23 352/week @ 2024-05-30 265/week @ 2024-06-06 207/week @ 2024-06-13 265/week @ 2024-06-20 180/week @ 2024-06-27

983 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
~73K SLoC