Skip to content

Commit 2596b00

Browse files
committed
Remove vestigial check for leadership-council subteam
In rust-lang/team#1403 we ended up doing things a little differently so that the top-level teams are not subteams of the council. This removes the check added in rust-lang#1937. This helps fix an issue where we do have some actual subteams of the council (like social-media), and we don't want those to show up on the main page.
1 parent d9f91d1 commit 2596b00

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

src/teams.rs

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,9 @@ impl Data {
6161
self.teams
6262
.into_iter()
6363
.filter(|team| team.website_data.is_some())
64-
// On the main page, show the leadership-council, all top-level
64+
// On the main page, show the leadership-council and all top-level
6565
// teams.
66-
.filter(|team| {
67-
matches!(
68-
team.subteam_of.as_deref(),
69-
None | Some("leadership-council")
70-
)
71-
})
66+
.filter(|team| team.kind == TeamKind::Team && team.subteam_of.is_none())
7267
.map(|team| IndexTeam {
7368
url: format!(
7469
"{}/{}",
@@ -77,11 +72,7 @@ impl Data {
7772
),
7873
team,
7974
})
80-
.for_each(|team| {
81-
if team.team.kind == TeamKind::Team {
82-
data.teams.push(team)
83-
}
84-
});
75+
.for_each(|team| data.teams.push(team));
8576

8677
data.teams.sort_by_key(|index_team| {
8778
Reverse(index_team.team.website_data.as_ref().unwrap().weight)
@@ -105,11 +96,14 @@ impl Data {
10596

10697
// Don't show pages for subteams
10798
if let Some(subteam) = &main_team.subteam_of {
108-
// Each launching-pad and leadership-council subteam has their own
109-
// page. Subteams of those subteams do not get a page of their own
110-
// (they are shown in their parent page). We may want to consider
111-
// putting launching-pad teams into a separate page in the future.
112-
if !matches!(subteam.as_ref(), "launching-pad" | "leadership-council") {
99+
// In the past we gave working groups their own dedicated pages linked
100+
// from the front page. We have now moved those working groups under
101+
// launching-pad, and the groups are listed as subteams of the launching
102+
// pad. To avoid breaking external links to things like
103+
// https://www.rust-lang.org/governance/wgs/wg-secure-code,
104+
// we still generate dedicated pages for these launching-pad teams,
105+
// but they are not linked from the main site.
106+
if !matches!(subteam.as_ref(), "launching-pad") {
113107
return Err(TeamNotFound.into());
114108
}
115109
}

0 commit comments

Comments
 (0)