Skip to content

Commit 708dcab

Browse files
committed
schema: turn [github] into a list
1 parent 0a9002d commit 708dcab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+51
-51
lines changed

src/schema.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ pub(crate) struct Team {
120120
people: TeamPeople,
121121
#[serde(default)]
122122
permissions: Permissions,
123-
github: Option<GitHubData>,
123+
#[serde(default)]
124+
github: Vec<GitHubData>,
124125
rfcbot: Option<RfcbotData>,
125126
website: Option<WebsiteData>,
126127
#[serde(default)]
@@ -243,7 +244,8 @@ impl Team {
243244
}
244245

245246
pub(crate) fn github_teams<'a>(&'a self, data: &Data) -> Result<Vec<GitHubTeam<'a>>, Error> {
246-
if let Some(github) = &self.github {
247+
let mut result = Vec::new();
248+
for github in &self.github {
247249
let mut members = self
248250
.members(data)?
249251
.iter()
@@ -259,18 +261,16 @@ impl Team {
259261
);
260262
}
261263
let name = github.team_name.as_deref().unwrap_or(&self.name);
262-
Ok(github
263-
.orgs
264-
.iter()
265-
.map(|org| GitHubTeam {
264+
265+
for org in &github.orgs {
266+
result.push(GitHubTeam {
266267
org: org.as_str(),
267268
name,
268269
members: members.clone(),
269-
})
270-
.collect())
271-
} else {
272-
Ok(Vec::new())
270+
});
271+
}
273272
}
273+
Ok(result)
274274
}
275275
}
276276

teams/cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ members = [
1414
bors.rust.review = true
1515
bors.cargo.review = true
1616

17-
[github]
17+
[[github]]
1818
orgs = ["rust-lang", "rust-lang-nursery"]
1919

2020
[rfcbot]

teams/clippy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ members = [
1919
[permissions]
2020
bors.clippy.review = true
2121

22-
[github]
22+
[[github]]
2323
orgs = ["rust-lang"]
2424

2525
[website]

teams/community-content.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ repo = "https://github.com/rust-community/content-team"
2020
discord-invite = "https://discord.gg/b7a22kw"
2121
discord-name = "#content-team"
2222

23-
[github]
23+
[[github]]
2424
orgs = ["rust-lang"]

teams/community-events.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ repo = "https://github.com/rust-community/events-team"
2020
discord-invite = "https://discord.gg/cj5HMXA"
2121
discord-name = "#events"
2222

23-
[github]
23+
[[github]]
2424
orgs = ["rust-lang"]

teams/community-localization.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ name = "Localization team"
2020
description = "Working on localization of compiler, documentation and websites"
2121
repo = "https://github.com/rust-lang/community-localization"
2222

23-
[github]
23+
[[github]]
2424
orgs = ["rust-lang"]
2525

2626
[[lists]]

teams/community-rustbridge.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ repo = "https://github.com/rustbridge/team"
2020
discord-invite = "https://discord.gg/cj5HMXA"
2121
discord-name = "#rustbridge"
2222

23-
[github]
23+
[[github]]
2424
orgs = ["rust-lang"]

teams/community-survey.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ members = [
1111
name = "Survey team"
1212
description = "Running, analysing, and presenting the community survey"
1313

14-
[github]
14+
[[github]]
1515
orgs = ["rust-lang"]

teams/community.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repo = "https://github.com/rust-community/team"
2424
discord-invite = "https://discord.gg/KskHZGT"
2525
discord-name = "#community-team"
2626

27-
[github]
27+
[[github]]
2828
orgs = ["rust-lang"]
2929

3030
[[lists]]

teams/compiler-contributors.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ perf = true
3131
crater = true
3232
bors.rust.review = true
3333

34-
[github]
34+
[[github]]
3535
orgs = ["rust-lang", "rust-lang-nursery"]
3636
extra-teams = ["compiler"]
3737

0 commit comments

Comments
 (0)