Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions repos/rust-lang/cc-rs.toml
Original file line number Diff line number Diff line change
@@ -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'
7 changes: 7 additions & 0 deletions repos/rust-lang/cfg-if.toml
Original file line number Diff line number Diff line change
@@ -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'
7 changes: 7 additions & 0 deletions repos/rust-lang/cmake-rs.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
org = 'rust-lang'
name = 'cmake-rs'
description = 'Rust build dependency for running cmake'
bots = []

[access.teams]
crate-maintainers = 'maintain'
10 changes: 10 additions & 0 deletions repos/rust-lang/compiler-builtins.toml
Original file line number Diff line number Diff line change
@@ -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'
7 changes: 7 additions & 0 deletions repos/rust-lang/glob.toml
Original file line number Diff line number Diff line change
@@ -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'
14 changes: 14 additions & 0 deletions repos/rust-lang/libc.toml
Original file line number Diff line number Diff line change
@@ -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'
7 changes: 7 additions & 0 deletions repos/rust-lang/libm.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
org = 'rust-lang'
name = 'libm'
description = "A port of MUSL's libm to Rust."
bots = []

[access.teams]
crate-maintainers = 'maintain'
7 changes: 7 additions & 0 deletions repos/rust-lang/libz-sys.toml
Original file line number Diff line number Diff line change
@@ -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'
7 changes: 7 additions & 0 deletions repos/rust-lang/log.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
org = 'rust-lang'
name = 'log'
description = 'Logging implementation for Rust'
bots = []

[access.teams]
crate-maintainers = 'maintain'
13 changes: 7 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,34 +167,35 @@ 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<String, String>,
}
#[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<Vec<String>>,
#[serde(skip_serializing_if = "Option::is_none")]
dismiss_stale_review: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
ci_checks: Option<Vec<String>>,
}
#[derive(serde::Serialize)]
#[derive(serde::Serialize, Debug)]
#[serde(rename_all = "kebab-case")]
struct RepoToAdd<'a> {
org: &'a str,
name: &'a str,
description: &'a str,
bots: Vec<String>,
access: AccessToAdd,
#[serde(skip_serializing_if = "Vec::is_empty")]
branch: Vec<BranchToAdd>,
}
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();
Expand Down