diff options
| author | Leedehai <18319900+Leedehai@users.noreply.github.com> | 2024-03-23 07:53:17 -0400 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2024-05-17 14:27:58 +0200 |
| commit | 3a5a4d9227f25ac9863b0af8e242b39bef71ae9c (patch) | |
| tree | db3a7036f4a90ad0b949d85294f19e46957d1154 | |
| parent | b2fb64f79cf8774015a15658e3c2e62b9f2f4442 (diff) | |
Exclude bots from the doc's contributor list (#3731)
| -rw-r--r-- | docs/src/contribs.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/src/contribs.rs b/docs/src/contribs.rs index 58a730e2..d9824c39 100644 --- a/docs/src/contribs.rs +++ b/docs/src/contribs.rs @@ -9,6 +9,7 @@ use crate::{Html, Resolver}; /// Build HTML detailing the contributors between two tags. pub fn contributors(resolver: &dyn Resolver, from: &str, to: &str) -> Option<Html> { let staff = ["laurmaedje", "reknih"]; + let bots = ["dependabot[bot]"]; // Determine number of contributions per person. let mut contributors = HashMap::<String, Contributor>::new(); @@ -26,7 +27,10 @@ pub fn contributors(resolver: &dyn Resolver, from: &str, to: &str) -> Option<Htm // Keep only non-staff people. let mut contributors: Vec<_> = contributors .into_values() - .filter(|c| !staff.contains(&c.login.as_str())) + .filter(|c| { + let login = c.login.as_str(); + !staff.contains(&login) && !bots.contains(&login) + }) .collect(); // Sort by highest number of commits. |
