summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorLeedehai <18319900+Leedehai@users.noreply.github.com>2024-03-23 07:53:17 -0400
committerLaurenz <laurmaedje@gmail.com>2024-05-17 14:27:58 +0200
commit3a5a4d9227f25ac9863b0af8e242b39bef71ae9c (patch)
treedb3a7036f4a90ad0b949d85294f19e46957d1154 /docs
parentb2fb64f79cf8774015a15658e3c2e62b9f2f4442 (diff)
Exclude bots from the doc's contributor list (#3731)
Diffstat (limited to 'docs')
-rw-r--r--docs/src/contribs.rs6
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.