Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
11 changes: 0 additions & 11 deletions docs/toml-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ page = "lang"
email = "[email protected]"
# The GitHub repository where this team does their work.
repo = "https://github.com/rust-lang/lang-team"
# A link to access the team's Discord channel.
discord-invite = "https://discord.gg/e6Q3cvu"
# The name of the team's channel on Discord.
discord-name = "#wg-rustup"
# The name of the team's stream on Zulip.
zulip-stream = "t-lang"
# An alias for the team's matrix room.
Expand Down Expand Up @@ -239,13 +235,6 @@ extra-teams = [
excluded-people = [
"rylev",
]

# Roles to define in Discord.
[[discord-roles]]
# The name of the role.
name = "security"
# The color for the role.
color = "#e91e63"
```

## Permissions
Expand Down
15 changes: 0 additions & 15 deletions rust_team_data/src/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ pub struct Team {
pub github: Option<TeamGitHub>,
pub website_data: Option<TeamWebsite>,
pub roles: Vec<MemberRole>,
pub discord: Vec<TeamDiscord>,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
Expand Down Expand Up @@ -58,7 +57,6 @@ pub struct TeamWebsite {
pub page: String,
pub email: Option<String>,
pub repo: Option<String>,
pub discord: Option<DiscordInvite>,
pub zulip_stream: Option<String>,
pub matrix_room: Option<String>,
pub weight: i64,
Expand All @@ -70,19 +68,6 @@ pub struct MemberRole {
pub description: String,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct TeamDiscord {
pub name: String,
pub members: Vec<u64>,
pub color: Option<String>,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct DiscordInvite {
pub channel: String,
pub url: String,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct Teams {
#[serde(flatten)]
Expand Down
49 changes: 0 additions & 49 deletions src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ pub(crate) struct Team {
zulip_groups: Vec<RawZulipGroup>,
#[serde(default)]
zulip_streams: Vec<RawZulipStream>,
discord_roles: Option<Vec<DiscordRole>>,
}

impl Team {
Expand Down Expand Up @@ -258,10 +257,6 @@ impl Team {
&self.roles
}

pub(crate) fn discord_roles(&self) -> Option<&Vec<DiscordRole>> {
self.discord_roles.as_ref()
}

/// Exposed only for validation.
pub(crate) fn raw_people(&self) -> &TeamPeople {
&self.people
Expand Down Expand Up @@ -509,15 +504,6 @@ impl Team {
Ok(result)
}

pub(crate) fn discord_ids(&self, data: &Data) -> Result<Vec<u64>, Error> {
Ok(self
.members(data)?
.iter()
.flat_map(|name| data.person(name).map(|p| p.discord_id()))
.flatten()
.collect())
}

pub(crate) fn is_alumni_team(&self) -> bool {
self.people.include_all_alumni
}
Expand All @@ -537,23 +523,6 @@ impl Team {
}
}

#[derive(serde_derive::Deserialize, Debug)]
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
pub(crate) struct DiscordRole {
name: String,
color: Option<String>,
}

impl DiscordRole {
pub(crate) fn name(&self) -> &str {
&self.name
}

pub(crate) fn color(&self) -> Option<&str> {
self.color.as_ref().map(|s| &s[..])
}
}

#[derive(Eq, PartialEq)]
pub(crate) struct GitHubTeam<'a> {
pub(crate) org: &'a str,
Expand Down Expand Up @@ -639,11 +608,6 @@ pub(crate) struct RfcbotData {
pub(crate) exclude_members: Vec<String>,
}

pub(crate) struct DiscordInvite<'a> {
pub(crate) url: &'a str,
pub(crate) channel: &'a str,
}

#[derive(serde_derive::Deserialize, Debug)]
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
pub(crate) struct WebsiteData {
Expand All @@ -652,8 +616,6 @@ pub(crate) struct WebsiteData {
page: Option<String>,
email: Option<String>,
repo: Option<String>,
discord_invite: Option<String>,
discord_name: Option<String>,
matrix_room: Option<String>,
zulip_stream: Option<String>,
#[serde(default)]
Expand Down Expand Up @@ -685,17 +647,6 @@ impl WebsiteData {
self.repo.as_deref()
}

pub(crate) fn discord(&self) -> Option<DiscordInvite<'_>> {
if let (Some(url), Some(channel)) = (&self.discord_invite, &self.discord_name) {
Some(DiscordInvite {
url: url.as_ref(),
channel: channel.as_ref(),
})
} else {
None
}
}

pub(crate) fn zulip_stream(&self) -> Option<&str> {
self.zulip_stream.as_deref()
}
Expand Down
20 changes: 0 additions & 20 deletions src/static_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,6 @@ fn convert_teams<'a>(
let mut github_teams = team.github_teams(data)?;
github_teams.sort();

let mut member_discord_ids = team.discord_ids(data)?;
member_discord_ids.sort();

let team_data = v1::Team {
name: team.name().into(),
kind: match team.kind() {
Expand Down Expand Up @@ -514,10 +511,6 @@ fn convert_teams<'a>(
page: ws.page().unwrap_or_else(|| team.name()).into(),
email: ws.email().map(|e| e.into()),
repo: ws.repo().map(|e| e.into()),
discord: ws.discord().map(|i| v1::DiscordInvite {
channel: i.channel.into(),
url: i.url.into(),
}),
zulip_stream: ws.zulip_stream().map(|s| s.into()),
matrix_room: ws.matrix_room().map(|s| s.into()),
weight: ws.weight(),
Expand All @@ -530,19 +523,6 @@ fn convert_teams<'a>(
description: role.description.clone(),
})
.collect(),
discord: team
.discord_roles()
.map(|roles| {
roles
.iter()
.map(|role| v1::TeamDiscord {
name: role.name().into(),
color: role.color().map(String::from),
members: member_discord_ids.clone(),
})
.collect()
})
.unwrap_or_else(Vec::new),
};
team_map.insert(team.name().into(), team_data);
}
Expand Down
23 changes: 0 additions & 23 deletions src/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ static CHECKS: &[Check<fn(&Data, &mut Vec<String>)>] = checks![
validate_github_teams,
validate_zulip_stream_name,
validate_subteam_of_required,
validate_discord_team_members_have_discord_ids,
validate_unique_zulip_groups,
validate_zulip_group_ids,
validate_zulip_group_extra_people,
Expand Down Expand Up @@ -657,28 +656,6 @@ fn validate_subteam_of_required(data: &Data, errors: &mut Vec<String>) {
})
}

fn validate_discord_team_members_have_discord_ids(data: &Data, errors: &mut Vec<String>) {
wrapper(data.teams(), errors, |team, _| {
if team.discord_roles().is_some() && team.name() != "all" {
let team_members = team.members(data)?;
if team_members.len() != team.discord_ids(data)?.len() {
let missing_discord_id = team_members
.into_iter()
.filter(|name| data.person(name).map(|p| p.discord_id()) == Some(None))
.collect::<Vec<_>>();

bail!(
"the following members of the \"{}\" team do not have discord_ids: {}",
team.name(),
missing_discord_id.join(", "),
);
}
}

Ok(())
});
}

/// Ensure every member of a team that has a Zulip group has a Zulip id
fn validate_zulip_users(data: &Data, zulip: &ZulipApi, errors: &mut Vec<String>) {
let by_id = match zulip.get_users(false) {
Expand Down
1 change: 0 additions & 1 deletion sync-team/src/github/tests/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ impl From<TeamData> for v1::Team {
github: (!gh_teams.is_empty()).then_some(TeamGitHub { teams: gh_teams }),
website_data: None,
roles: vec![],
discord: vec![],
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions teams/all.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ include-team-members = false
extra-emails = [
"[email protected]",
]

[[discord-roles]]
name = "WGs and Teams"
2 changes: 0 additions & 2 deletions teams/archive/community-content.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ alumni = [
name = "Content team"
description = "Collecting and developing community content"
repo = "https://github.com/rust-community/content-team"
discord-invite = "https://discord.gg/b7a22kw"
discord-name = "#content-team"

[[github]]
orgs = ["rust-lang"]
2 changes: 0 additions & 2 deletions teams/archive/wg-net-async.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ alumni = ["cramertj", "MajorBreakfast"]
[website]
name = "Async foundations working group"
description = "Stabilizing and documenting the async features of Rust"
discord-invite = "https://discord.gg/JebCvj5"
discord-name = "#wg-net-async"
2 changes: 0 additions & 2 deletions teams/archive/wg-net-embedded.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ alumni = [
[website]
name = "Embedded networking working group"
description = "Supporting IoT development with Rust"
discord-invite = "https://discord.gg/wUQwRea"
discord-name = "#wg-net-embedded"
2 changes: 0 additions & 2 deletions teams/archive/wg-net-web.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ alumni = ["aturon", "yoshuawuyts"]
[website]
name = "Web foundations working group"
description = "Improving web development with Rust"
discord-invite = "https://discord.gg/NKHgJpq"
discord-name = "#wg-net-web"
2 changes: 0 additions & 2 deletions teams/archive/wg-net.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ alumni = [
page = "networking"
name = "Networking working group"
description = "Focusing on improving the end-to-end experience with both sync and async networking code, in coordination with the growing web ecosystem"
discord-invite = "https://discord.gg/ueak2ds"
discord-name = "#wg-net"

[[lists]]
address = "[email protected]"
Expand Down
2 changes: 0 additions & 2 deletions teams/archive/wg-rustfix.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@ alumni = [
[website]
name = "Rustfix working group"
description = "Developing cargo-fix and serving as a point of contact for other teams"
discord-invite = "https://discord.gg/e6Q3cvu"
discord-name = "#wg-rustfix"
repo = "https://github.com/rust-lang/rustfix"
2 changes: 0 additions & 2 deletions teams/community-events.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ alumni = [
name = "Events team"
description = "Supporting and organizing community events"
repo = "https://github.com/rust-community/events-team"
discord-invite = "https://discord.gg/cj5HMXA"
discord-name = "#events"

[[github]]
orgs = ["rust-lang"]
2 changes: 0 additions & 2 deletions teams/community-rustbridge.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ alumni = [
name = "RustBridge team"
description = "Helping to bring underrepresented groups into Rust"
repo = "https://github.com/rustbridge/team"
discord-invite = "https://discord.gg/cj5HMXA"
discord-name = "#rustbridge"

[[github]]
orgs = ["rust-lang"]
4 changes: 0 additions & 4 deletions teams/community.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ extra-people = [
"arshiamufti",
]

[[discord-roles]]
name = "community-team"
color = "#c27c0e"

[website]
name = "Community team"
description = "Engagement with the Rust community"
Expand Down
2 changes: 0 additions & 2 deletions teams/rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ bors.rust.review = true
[website]
name = "Rustfmt team"
description = "Designing and implementing rustfmt, a formatting tool for Rust code"
discord-invite = "https://discord.gg/e6Q3cvu"
discord-name = "#wg-rustfmt"
repo = "https://github.com/rust-lang/rustfmt"

[[zulip-groups]]
Expand Down
2 changes: 0 additions & 2 deletions teams/rustup.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ alumni = [
name = "Rustup team"
description = "Designing and implementing rustup"
zulip-stream = "t-rustup"
discord-invite = "https://discord.gg/e6Q3cvu"
discord-name = "#wg-rustup"
repo = "https://github.com/rust-lang/rustup"

[[github]]
Expand Down
2 changes: 0 additions & 2 deletions teams/wg-bindgen.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ alumni = [
name = "Bindgen working group"
description = "Developing tools for generating FFI bindings"
repo = "https://github.com/rust-lang/rust-bindgen"
discord-invite = "https://discord.gg/kgujzMR"
discord-name = "#wg-bindgen"

[[github]]
orgs = ["rust-lang"]
2 changes: 0 additions & 2 deletions teams/wg-gamedev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ page = "gamedev"
name = "Game development working group"
description = "Focusing on making Rust the default choice for game development"
repo = "https://github.com/rust-gamedev"
discord-invite = "https://discord.gg/sG23nSS"
discord-name = "#wg-gamedev"

[[lists]]
address = "[email protected]"
4 changes: 0 additions & 4 deletions teams/wg-security-response.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,5 @@ repo = "https://github.com/rust-lang/wg-security-response"
[[lists]]
address = "[email protected]"

[[discord-roles]]
name = "security"
color = "#e91e63"

[[zulip-groups]]
name = "WG-security-response"
4 changes: 1 addition & 3 deletions tests/static-api/_expected/v1/archived-teams.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"page": "wg-test",
"email": null,
"repo": null,
"discord": null,
"zulip_stream": null,
"matrix_room": null,
"weight": 0
Expand All @@ -35,7 +34,6 @@
"id": "convener",
"description": "Convener"
}
],
"discord": []
]
}
}
Loading