From 27aa69d35aebeecf7534af75f83314dbd25a3558 Mon Sep 17 00:00:00 2001 From: Ryan Levick Date: Wed, 26 Oct 2022 15:54:24 +0200 Subject: [PATCH 1/4] Add some crate-maintainer projects --- repos/rust-lang/compiler-builtins.toml | 10 ++++++++++ repos/rust-lang/libc.toml | 14 ++++++++++++++ repos/rust-lang/libm.toml | 7 +++++++ repos/rust-lang/log.toml | 7 +++++++ src/main.rs | 11 ++++++----- 5 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 repos/rust-lang/compiler-builtins.toml create mode 100644 repos/rust-lang/libc.toml create mode 100644 repos/rust-lang/libm.toml create mode 100644 repos/rust-lang/log.toml diff --git a/repos/rust-lang/compiler-builtins.toml b/repos/rust-lang/compiler-builtins.toml new file mode 100644 index 000000000..f9602cc6e --- /dev/null +++ b/repos/rust-lang/compiler-builtins.toml @@ -0,0 +1,10 @@ +org = 'rust-lang' +name = 'compiler-builtins' +description = 'Porting `compiler-rt` intrinsics to Rust' +bots = [] + +[access.teams] +crate-maintainers = 'maintain' + +[[branch]] +name = 'master' diff --git a/repos/rust-lang/libc.toml b/repos/rust-lang/libc.toml new file mode 100644 index 000000000..706196d6e --- /dev/null +++ b/repos/rust-lang/libc.toml @@ -0,0 +1,14 @@ +org = 'rust-lang' +name = 'libc' +description = 'Raw bindings to platform APIs for Rust' +bots = [ + 'bors', + 'highfive', + 'rustbot', +] + +[access.teams] +crate-maintainers = 'maintain' + +[[branch]] +name = 'master' diff --git a/repos/rust-lang/libm.toml b/repos/rust-lang/libm.toml new file mode 100644 index 000000000..f9833f612 --- /dev/null +++ b/repos/rust-lang/libm.toml @@ -0,0 +1,7 @@ +org = 'rust-lang' +name = 'libm' +description = "A port of MUSL's libm to Rust." +bots = [] + +[access.teams] +crate-maintainers = 'maintain' diff --git a/repos/rust-lang/log.toml b/repos/rust-lang/log.toml new file mode 100644 index 000000000..420dbc33a --- /dev/null +++ b/repos/rust-lang/log.toml @@ -0,0 +1,7 @@ +org = 'rust-lang' +name = 'log' +description = 'Logging implementation for Rust' +bots = [] + +[access.teams] +crate-maintainers = 'maintain' diff --git a/src/main.rs b/src/main.rs index 1de672afc..2d8863c3d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -167,21 +167,21 @@ fn run() -> Result<(), Error> { info!("written data to {}", file); } Cli::AddRepo { org, name } => { - #[derive(serde::Serialize)] + #[derive(serde::Serialize, Debug)] #[serde(rename_all = "kebab-case")] struct AccessToAdd { teams: HashMap, } - #[derive(serde::Serialize)] + #[derive(serde::Serialize, Debug)] #[serde(rename_all = "kebab-case")] struct BranchToAdd { name: String, #[serde(skip_serializing_if = "Option::is_none")] - ci_checks: Option>, - #[serde(skip_serializing_if = "Option::is_none")] dismiss_stale_review: Option, + #[serde(skip_serializing_if = "Option::is_none")] + ci_checks: Option>, } - #[derive(serde::Serialize)] + #[derive(serde::Serialize, Debug)] #[serde(rename_all = "kebab-case")] struct RepoToAdd<'a> { org: &'a str, @@ -189,6 +189,7 @@ fn run() -> Result<(), Error> { description: &'a str, bots: Vec, access: AccessToAdd, + #[serde(skip_serializing_if = "Vec::is_empty")] branch: Vec, } let github = github::GitHubApi::new(); From 4b437b3ba055de6e898f18f9c601dbf56d1c3c16 Mon Sep 17 00:00:00 2001 From: Ryan Levick Date: Wed, 26 Oct 2022 16:01:58 +0200 Subject: [PATCH 2/4] Add more crate repos --- repos/rust-lang/cc-rs.toml | 10 ++++++++++ repos/rust-lang/cfg-if.toml | 7 +++++++ repos/rust-lang/cmake-rs.toml | 7 +++++++ repos/rust-lang/libz-sys.toml | 7 +++++++ src/main.rs | 2 +- 5 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 repos/rust-lang/cc-rs.toml create mode 100644 repos/rust-lang/cfg-if.toml create mode 100644 repos/rust-lang/cmake-rs.toml create mode 100644 repos/rust-lang/libz-sys.toml diff --git a/repos/rust-lang/cc-rs.toml b/repos/rust-lang/cc-rs.toml new file mode 100644 index 000000000..0f50cc43f --- /dev/null +++ b/repos/rust-lang/cc-rs.toml @@ -0,0 +1,10 @@ +org = 'rust-lang' +name = 'cc-rs' +description = 'Rust library for build scripts to compile C/C++ code into a Rust library' +bots = [] + +[access.teams] +crate-maintainers = 'write' + +[[branch]] +name = 'main' diff --git a/repos/rust-lang/cfg-if.toml b/repos/rust-lang/cfg-if.toml new file mode 100644 index 000000000..473e146f0 --- /dev/null +++ b/repos/rust-lang/cfg-if.toml @@ -0,0 +1,7 @@ +org = 'rust-lang' +name = 'cfg-if' +description = 'A if/elif-like macro for Rust #[cfg] statements' +bots = [] + +[access.teams] +crate-maintainers = 'maintain' diff --git a/repos/rust-lang/cmake-rs.toml b/repos/rust-lang/cmake-rs.toml new file mode 100644 index 000000000..d976ec542 --- /dev/null +++ b/repos/rust-lang/cmake-rs.toml @@ -0,0 +1,7 @@ +org = 'rust-lang' +name = 'cmake-rs' +description = 'Rust build dependency for running cmake' +bots = [] + +[access.teams] +crate-maintainers = 'maintain' diff --git a/repos/rust-lang/libz-sys.toml b/repos/rust-lang/libz-sys.toml new file mode 100644 index 000000000..235206997 --- /dev/null +++ b/repos/rust-lang/libz-sys.toml @@ -0,0 +1,7 @@ +org = 'rust-lang' +name = 'libz-sys' +description = 'Rust crate package to link to a system libz (zlib)' +bots = [] + +[access.teams] +crate-maintainers = 'maintain' diff --git a/src/main.rs b/src/main.rs index 2d8863c3d..7b69e587d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -195,7 +195,7 @@ fn run() -> Result<(), Error> { let github = github::GitHubApi::new(); let repo = match github.repo(&org, &name)? { Some(r) => r, - None => failure::bail!("The repo '{org}/{name}' was not found on GitHub"), + None => failure::bail!("The repo '{}/{}' was not found on GitHub", org, name), }; let mut teams = HashMap::new(); let mut bots = Vec::new(); From 2769a176e5877d6b90e4223e8dabadf87499afd4 Mon Sep 17 00:00:00 2001 From: Ryan Levick Date: Wed, 26 Oct 2022 16:05:34 +0200 Subject: [PATCH 3/4] Add some more repos --- repos/rust-lang/glob.toml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 repos/rust-lang/glob.toml diff --git a/repos/rust-lang/glob.toml b/repos/rust-lang/glob.toml new file mode 100644 index 000000000..76f94c4e2 --- /dev/null +++ b/repos/rust-lang/glob.toml @@ -0,0 +1,7 @@ +org = 'rust-lang' +name = 'glob' +description = 'Support for matching file paths against Unix shell style patterns.' +bots = [] + +[access.teams] +libs = 'write' From 8933b1645a7871407eabe714f44a88e7b9dd5920 Mon Sep 17 00:00:00 2001 From: Ryan Levick Date: Wed, 26 Oct 2022 18:56:33 +0200 Subject: [PATCH 4/4] Adjust some permissions --- repos/rust-lang/cc-rs.toml | 2 +- repos/rust-lang/glob.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/rust-lang/cc-rs.toml b/repos/rust-lang/cc-rs.toml index 0f50cc43f..34c8242d8 100644 --- a/repos/rust-lang/cc-rs.toml +++ b/repos/rust-lang/cc-rs.toml @@ -4,7 +4,7 @@ description = 'Rust library for build scripts to compile C/C++ code into a Rust bots = [] [access.teams] -crate-maintainers = 'write' +crate-maintainers = 'maintain' [[branch]] name = 'main' diff --git a/repos/rust-lang/glob.toml b/repos/rust-lang/glob.toml index 76f94c4e2..d3e63a781 100644 --- a/repos/rust-lang/glob.toml +++ b/repos/rust-lang/glob.toml @@ -4,4 +4,4 @@ description = 'Support for matching file paths against Unix shell style patterns bots = [] [access.teams] -libs = 'write' +crate-maintainers = 'maintain'