diff --git a/src/schema.rs b/src/schema.rs index be2a524da..7607f313f 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -308,18 +308,14 @@ impl Team { let alumni = data .teams() .chain(data.archived_teams()) - .flat_map(|t| t.alumni()) - .map(|a| a.as_str()) + .flat_map(|t| t.explicit_alumni()) + .map(|a| a.github.as_str()) .filter(|person| !active_members.contains(person)); members.extend(alumni); } Ok(members) } - pub(crate) fn alumni(&self) -> &[String] { - self.people.alumni.as_ref().map_or(&[], Vec::as_slice) - } - pub(crate) fn raw_lists(&self) -> &[TeamList] { &self.lists } @@ -478,6 +474,10 @@ impl Team { &self.people.members } + pub(crate) fn explicit_alumni(&self) -> &[TeamMember] { + self.people.alumni.as_ref().map_or(&[], Vec::as_slice) + } + pub(crate) fn contains_person(&self, data: &Data, person: &Person) -> Result { let members = self.members(data)?; Ok(members.contains(person.github())) @@ -525,7 +525,7 @@ impl std::cmp::Ord for GitHubTeam<'_> { pub(crate) struct TeamPeople { pub leads: Vec, pub members: Vec, - pub alumni: Option>, + pub alumni: Option>, #[serde(default)] pub included_teams: Vec, #[serde(default = "default_false")] diff --git a/src/static_api.rs b/src/static_api.rs index e71d93363..5c093e1f6 100644 --- a/src/static_api.rs +++ b/src/static_api.rs @@ -147,6 +147,9 @@ impl<'a> Generator<'a> { for member in team.explicit_members().iter().cloned() { website_roles.insert(member.github, member.roles); } + for alum in team.explicit_alumni().iter().cloned() { + website_roles.insert(alum.github, alum.roles); + } let leads = team.leads(); let mut members = Vec::new(); @@ -165,14 +168,17 @@ impl<'a> Generator<'a> { members.sort_by_key(|member| !member.is_lead); let mut alumni = Vec::new(); - for github_name in team.alumni() { - if let Some(person) = self.data.person(github_name) { + for alum in team.explicit_alumni() { + if let Some(person) = self.data.person(&alum.github) { alumni.push(v1::TeamMember { name: person.name().into(), - github: github_name.to_string(), + github: alum.github.to_string(), github_id: person.github_id(), is_lead: false, - roles: Vec::new(), + roles: website_roles + .get(alum.github.as_str()) + .cloned() + .unwrap_or_default(), }); } } diff --git a/src/validate.rs b/src/validate.rs index bf30253cd..0afe6010d 100644 --- a/src/validate.rs +++ b/src/validate.rs @@ -304,8 +304,8 @@ fn validate_inactive_members(data: &Data, errors: &mut Vec) { for member in members { referenced_members.insert(member); } - for person in team.alumni() { - referenced_members.insert(person); + for person in team.explicit_alumni() { + referenced_members.insert(person.github.as_str()); } for list in team.raw_lists() { for person in &list.extra_people { diff --git a/teams/compiler-maintainers.toml b/teams/compiler-maintainers.toml deleted file mode 100644 index 91c5322a5..000000000 --- a/teams/compiler-maintainers.toml +++ /dev/null @@ -1,51 +0,0 @@ -name = "compiler-maintainers" -subteam-of = "compiler" - -[people] -leads = [] -members = [ - "BoxyUwU", - "chenyukang", - "cjgillot", - "compiler-errors", - "davidtwco", - "estebank", - "fee1-dead", - "jackh726", - - "lcnr", - "lqd", - "Mark-Simulacrum", - "matthewjasper", - "Nadrieril", - "nagisa", - "nnethercote", - "Noratrieb", - "oli-obk", - "petrochenkov", - "saethlin", - "SparrowLii", - "spastorino", - "wesleywiser", -] -alumni = [ - "Aaron1011", - "Aatch", - "arielb1", - "bkoropoff", - "cramertj", - "dotdash", - "eddyb", - "michaelwoerister", - "jseyfried", - "nikomatsakis", - "nrc", - "pnkfelix", - "varkor", - "Zoxc", -] - -[website] -name = "Compiler maintainers" -repo = "https://github.com/rust-lang/compiler-team" -description = "Maintainers of the compiler" diff --git a/teams/compiler.toml b/teams/compiler.toml index dcb148609..1452a0458 100644 --- a/teams/compiler.toml +++ b/teams/compiler.toml @@ -8,46 +8,45 @@ members = [ "apiraino", "b-naber", "bjorn3", - "BoxyUwU", + { github = "BoxyUwU", roles = ["compiler-maintainer"] }, "camelid", - "chenyukang", + { github = "chenyukang", roles = ["compiler-maintainer"] }, "ChrisDenton", - "cjgillot", - "compiler-errors", + { github = "cjgillot", roles = ["compiler-maintainer"] }, + { github = "compiler-errors", roles = ["compiler-maintainer"] }, "cuviper", - "davidtwco", + { github = "davidtwco", roles = ["compiler-maintainer"] }, "DianQK", "durin42", "eholk", "est31", - "estebank", - "fee1-dead", + { github = "estebank", roles = ["compiler-maintainer"] }, + { github = "fee1-dead", roles = ["compiler-maintainer"] }, "flodiebold", "fmease", - "jackh726", + { github = "jackh726", roles = ["compiler-maintainer"] }, "jieyouxu", "jswrenn", - "lcnr", - "lqd", + { github = "lcnr", roles = ["compiler-maintainer"] }, + { github = "lqd", roles = ["compiler-maintainer"] }, "lukas-code", "m-ou-se", - "Mark-Simulacrum", - "matthewjasper", - "Nadrieril", - "nagisa", + { github = "Mark-Simulacrum", roles = ["compiler-maintainer"] }, + { github = "matthewjasper", roles = ["compiler-maintainer"] }, + { github = "Nadrieril", roles = ["compiler-maintainer"] }, + { github = "nagisa", roles = ["compiler-maintainer"] }, "nikic", "nikomatsakis", "Noratrieb", - "nnethercote", - "oli-obk", - "petrochenkov", - "pnkfelix", + { github = "nnethercote", roles = ["compiler-maintainer"] }, + { github = "oli-obk", roles = ["compiler-maintainer"] }, + { github = "petrochenkov", roles = ["compiler-maintainer"] }, "RalfJung", "rcvalle", - "saethlin", + { github = "saethlin", roles = ["compiler-maintainer"] }, "scottmcm", - "SparrowLii", - "spastorino", + { github = "SparrowLii", roles = ["compiler-maintainer"] }, + { github = "spastorino", roles = ["compiler-maintainer"] }, "TaKO8Ki", "tgross35", "the8472", @@ -55,32 +54,37 @@ members = [ "tmiasko", "Urgau", "WaffleLapkin", - "wesleywiser", + { github = "wesleywiser", roles = ["compiler-maintainer"] }, "workingjubilee", "Zalathar", ] alumni = [ - "Aaron1011", - "Aatch", - "arielb1", - "bkoropoff", + { github = "Aaron1011", roles = ["compiler-maintainer"] }, + { github = "Aatch", roles = ["compiler-maintainer"] }, + { github = "arielb1", roles = ["compiler-maintainer"] }, + { github = "bkoropoff", roles = ["compiler-maintainer"] }, "Centril", - "cramertj", - "dotdash", + { github = "cramertj", roles = ["compiler-maintainer"] }, + { github = "dotdash", roles = ["compiler-maintainer"] }, "ecstatic-morse", - "eddyb", - "jseyfried", + { github = "eddyb", roles = ["compiler-maintainer"] }, + { github = "jseyfried", roles = ["compiler-maintainer"] }, "LeSeulArtichaut", "matklad", - "michaelwoerister", - "nrc", + { github = "michaelwoerister", roles = ["compiler-maintainer"] }, + { github = "nrc", roles = ["compiler-maintainer"] }, + { github = "pnkfelix", roles = ["compiler-maintainer"] }, "scalexm", - "varkor", + { github = "varkor", roles = ["compiler-maintainer"] }, "Xanewok", "zackmdavis", - "Zoxc", + { github = "Zoxc", roles = ["compiler-maintainer"] } ] +[[roles]] +id = "compiler-maintainer" +description = "Maintainer" + [permissions] perf = true crater = true