-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Adds e-mail to affiliated concern reporting
- Loading branch information
1 parent
e00e34d
commit 468e99a
Showing
3 changed files
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -375,7 +375,13 @@ async fn affiliation(engine: &mut PluginEngine, key: Target) -> Result<Vec<bool> | |
// then add the contributor's name and its commit count to the contributor frequency hash map | ||
for contributor_view in contributor_views { | ||
let count = contributor_view.commits.len(); | ||
contributor_freq_map.insert(contributor_view.contributor.name, count); | ||
contributor_freq_map.insert( | ||
format!( | ||
"{} ({})", | ||
contributor_view.contributor.name, contributor_view.contributor.email | ||
), | ||
count, | ||
); | ||
} | ||
|
||
let all_contributors_value = engine | ||
|
@@ -639,6 +645,9 @@ mod test { | |
assert_eq!(output.len(), 2); | ||
let num_affiliated = output.iter().filter(|&n| *n).count(); | ||
assert_eq!(num_affiliated, 1); | ||
assert_eq!(concerns[0], "Contributor Jane Doe has count 2") | ||
assert_eq!( | ||
concerns[0], | ||
"Contributor Jane Doe ([email protected]) has count 2" | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters