Skip to content

Commit a8f57bc

Browse files
authored
Merge pull request #1628 from ehuss/mentions-cc
Mentions: Rename reviewers to "cc"
2 parents 06c5443 + c7c4e14 commit a8f57bc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub(crate) struct MentionsConfig {
9595
pub(crate) struct MentionsPathConfig {
9696
pub(crate) message: Option<String>,
9797
#[serde(default)]
98-
pub(crate) reviewers: Vec<String>,
98+
pub(crate) cc: Vec<String>,
9999
}
100100

101101
#[derive(PartialEq, Eq, Debug, serde::Deserialize)]

src/handlers/mentions.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ pub(super) async fn parse_input(
5858
.iter()
5959
// Only mention matching paths.
6060
// Don't mention if the author is in the list.
61-
.filter(|(path, MentionsPathConfig { reviewers, .. })| {
61+
.filter(|(path, MentionsPathConfig { cc, .. })| {
6262
let path = Path::new(path);
6363
file_paths.iter().any(|p| p.starts_with(path))
64-
&& !reviewers.iter().any(|r| r == &event.issue.user.login)
64+
&& !cc.iter().any(|r| r == &event.issue.user.login)
6565
})
6666
.map(|(key, _mention)| key.to_string())
6767
.collect();
@@ -88,16 +88,16 @@ pub(super) async fn handle_input(
8888
// Avoid duplicate mentions.
8989
continue;
9090
}
91-
let MentionsPathConfig { message, reviewers } = &config.paths[to_mention];
91+
let MentionsPathConfig { message, cc } = &config.paths[to_mention];
9292
if !result.is_empty() {
9393
result.push_str("\n\n");
9494
}
9595
match message {
9696
Some(m) => result.push_str(m),
9797
None => write!(result, "Some changes occurred in {to_mention}").unwrap(),
9898
}
99-
if !reviewers.is_empty() {
100-
write!(result, "\n\ncc {}", reviewers.join(", ")).unwrap();
99+
if !cc.is_empty() {
100+
write!(result, "\n\ncc {}", cc.join(", ")).unwrap();
101101
}
102102
state.data.paths.push(to_mention.to_string());
103103
}

0 commit comments

Comments
 (0)