Skip to content

Commit d88af32

Browse files
author
Niko Matsakis
committed
require a single point-of-contact
1 parent 926d600 commit d88af32

File tree

81 files changed

+477
-239
lines changed

Some content is hidden

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

81 files changed

+477
-239
lines changed

book.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@ level = 0
4242
"/2024h2/accepted.html" = "goals.html"
4343
"/2024h2/flagship.html" = "goals.html"
4444
"/introduction.html" = "index.html"
45+
"/about/provisional_goals.html" = "about/invited_goals.html"
4546

4647
[output.markdown]

crates/rust-project-goals-cli/src/rfc.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,11 @@ fn issue_text(timeframe: &str, document: &GoalDocument) -> anyhow::Result<String
338338

339339
Ok(format!(
340340
r##"
341-
| Metadata | |
342-
| -------- | --- |
343-
| Owner(s) | {owners} |
344-
| Team(s) | {teams} |
345-
| Goal document | [{timeframe}/{goal_file}](https://rust-lang.github.io/rust-project-goals/{timeframe}/{goal_file}.html) |
341+
| Metadata | |
342+
| -------- | --- |
343+
| Point of contact | {poc} |
344+
| Team(s) | {teams} |
345+
| Goal document | [{timeframe}/{goal_file}](https://rust-lang.github.io/rust-project-goals/{timeframe}/{goal_file}.html) |
346346
347347
## Summary
348348
@@ -354,7 +354,7 @@ fn issue_text(timeframe: &str, document: &GoalDocument) -> anyhow::Result<String
354354
355355
[Team]: https://img.shields.io/badge/Team%20ask-red
356356
"##,
357-
owners = &document.metadata.owner_usernames().join(", "),
357+
poc = &document.metadata.owner_usernames().join(", "),
358358
teams = teams.join(", "),
359359
summary = document.summary,
360360
tasks = tasks.join("\n"),

crates/rust-project-goals/src/goal.rs

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use regex::Regex;
99
use crate::config::Configuration;
1010
use crate::gh::issue_id::{IssueId, Repository};
1111
use crate::markwaydown::{self, Section, Table};
12-
use crate::re::USERNAME;
12+
use crate::re::{self, USERNAME};
1313
use crate::team::{self, TeamName};
1414
use crate::util::{self, commas, markdown_files, ARROW};
1515

@@ -42,7 +42,7 @@ pub struct Metadata {
4242
#[allow(unused)]
4343
pub title: String,
4444
pub short_title: String,
45-
pub owners: String,
45+
pub pocs: String,
4646
pub status: Status,
4747
pub tracking_issue: Option<IssueId>,
4848
pub table: Table,
@@ -139,7 +139,7 @@ impl GoalDocument {
139139
team_asks.extend(plan_item.team_asks(
140140
&link_path,
141141
goal_title,
142-
&metadata.owners,
142+
&metadata.pocs,
143143
)?);
144144
}
145145
}
@@ -207,7 +207,7 @@ pub fn format_team_asks(asks_of_any_team: &[&TeamAsk]) -> anyhow::Result<String>
207207

208208
let mut table = vec![vec![
209209
"Goal".to_string(),
210-
"Owner".to_string(),
210+
"Point of contact".to_string(),
211211
"Notes".to_string(),
212212
]];
213213

@@ -250,7 +250,7 @@ pub fn format_goal_table(goals: &[&GoalDocument]) -> anyhow::Result<String> {
250250
if !goals_are_proposed {
251251
table = vec![vec![
252252
"Goal".to_string(),
253-
"Owner".to_string(),
253+
"Point of contact".to_string(),
254254
"Progress".to_string(),
255255
]];
256256

@@ -276,14 +276,14 @@ pub fn format_goal_table(goals: &[&GoalDocument]) -> anyhow::Result<String> {
276276

277277
table.push(vec![
278278
format!("[{}]({})", goal.metadata.title, goal.link_path.display()),
279-
goal.metadata.owners.clone(),
279+
goal.metadata.pocs.clone(),
280280
progress_bar,
281281
]);
282282
}
283283
} else {
284284
table = vec![vec![
285285
"Goal".to_string(),
286-
"Owner".to_string(),
286+
"Point of contact".to_string(),
287287
"Team".to_string(),
288288
]];
289289

@@ -297,7 +297,7 @@ pub fn format_goal_table(goals: &[&GoalDocument]) -> anyhow::Result<String> {
297297
let teams: Vec<&TeamName> = teams.into_iter().collect();
298298
table.push(vec![
299299
format!("[{}]({})", goal.metadata.title, goal.link_path.display()),
300-
goal.metadata.owners.clone(),
300+
goal.metadata.pocs.clone(),
301301
commas(&teams),
302302
]);
303303
}
@@ -357,13 +357,17 @@ fn extract_metadata(sections: &[Section]) -> anyhow::Result<Option<Metadata>> {
357357

358358
let short_title_row = first_table.rows.iter().find(|row| row[0] == "Short title");
359359

360-
let Some(owners_row) = first_table
360+
let Some(poc_row) = first_table
361361
.rows
362362
.iter()
363-
.find(|row| row[0] == "Owner" || row[0] == "Owner(s)" || row[0] == "Owners")
363+
.find(|row| row[0] == "Point of contact")
364364
else {
365-
anyhow::bail!("metadata table has no `Owner(s)` row")
365+
anyhow::bail!("metadata table has no `Point of contact` row")
366366
};
367+
368+
if !re::is_just(&re::USERNAME, poc_row[1].trim()) {
369+
anyhow::bail!("point of contact must be a single github username (found {:?})", poc_row[1])
370+
}
367371

368372
let Some(status_row) = first_table.rows.iter().find(|row| row[0] == "Status") else {
369373
anyhow::bail!("metadata table has no `Status` row")
@@ -387,7 +391,7 @@ fn extract_metadata(sections: &[Section]) -> anyhow::Result<Option<Metadata>> {
387391
} else {
388392
title.to_string()
389393
},
390-
owners: owners_row[1].to_string(),
394+
pocs: poc_row[1].to_string(),
391395
status,
392396
tracking_issue: issue,
393397
table: first_table.clone(),
@@ -589,7 +593,7 @@ fn extract_identifiers(s: &str) -> Vec<&str> {
589593
impl Metadata {
590594
/// Extracts the `@abc` usernames found in the owner listing.
591595
pub fn owner_usernames(&self) -> Vec<&str> {
592-
owner_usernames(&self.owners)
596+
owner_usernames(&self.pocs)
593597
}
594598
}
595599

crates/rust-project-goals/src/re.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,9 @@ lazy_static! {
5454
Regex::new(r"https://github.com/(?P<org>[^#/]*)/(?P<repo>[^#/]*)/issues/(?P<issue>[0-9]+)")
5555
.unwrap();
5656
}
57+
58+
/// True if the entire string `s` matches `re`
59+
pub fn is_just(re: &Regex, s: &str) -> bool {
60+
let output = re.replace(s, "X");
61+
output == "X"
62+
}

gh-cache/@ghost.bincode

21 Bytes
Binary file not shown.

gh-cache/@jdonszelmann.bincode

30 Bytes
Binary file not shown.

src/2024h2/ATPIT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| Metadata | |
44
|----------------|------------------------------------|
5-
| Owner(s) | @oli-obk |
5+
| Point of contact | @oli-obk |
66
| Teams | [types], [lang] |
77
| Status | Accepted |
88
| Tracking issue | [rust-lang/rust-project-goals#103] |

src/2024h2/Contracts-and-invariants.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| Metadata | |
44
| -------- | -------------------------- |
5-
| Owner(s) | @pnkfelix |
5+
| Point of contact | @pnkfelix |
66
| Teams | [lang], [libs], [compiler] |
77
| Status | Not accepted |
88

src/2024h2/Patterns-of-empty-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| Metadata | |
44
| --- | --- |
5-
| Owner(s) | @Nadrieril |
5+
| Point of contact | @Nadrieril |
66
| Teams | [lang] |
77
| Status | Accepted |
88
| Tracking issue | [rust-lang/rust-project-goals#115] |

src/2024h2/Polonius.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| Metadata | |
44
| --- | --- |
5-
| Owner(s) | @lqd |
5+
| Point of contact | @lqd |
66
| Teams | [types] |
77
| Status | Accepted |
88
| Tracking issue | [rust-lang/rust-project-goals#118] |

0 commit comments

Comments
 (0)