From 33a596a50ec2f03e9212d61d703fe4f9cc7366e1 Mon Sep 17 00:00:00 2001 From: mpadge Date: Wed, 12 Feb 2025 14:00:38 +0100 Subject: [PATCH] rm bots from ctb lists --- DESCRIPTION | 2 +- NEWS.md | 1 + R/github.R | 4 ++++ codemeta.json | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 9277e35..6b0ec9b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: allcontributors Title: Acknowledge all Contributors to a Project -Version: 0.2.2.008 +Version: 0.2.2.009 Authors@R: c( person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre")), person("Chris", "Hartgerink", role = "aut"), diff --git a/NEWS.md b/NEWS.md index 8d228f5..8fb4863 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,6 +7,7 @@ ## Minor changes - Updated documentation to described different ways of keeping allcontributors lists up-to-date (#15; thanks to @maelle) +- Remove any "-bot" contributors from list ("actions-bot", "ropensci-review-bot", and similar) --- diff --git a/R/github.R b/R/github.R index 3fecf73..380cec0 100644 --- a/R/github.R +++ b/R/github.R @@ -5,6 +5,8 @@ #' @param org Github organisation name for repository #' @param repo Repository within `org` for which contributors are to be #' extracted +#' @param rm_ctbs_ptn Remove contributors which match this pattern (such as +#' "actions-bot", or "ropensci-review-bot"). #' @param quiet If `FALSE`, display progress information on screen. #' @inheritParams add_contributors #' @@ -20,6 +22,7 @@ get_contributors <- function (org, repo, exclude_issues = NULL, exclude_not_planned = TRUE, alphabetical = FALSE, + rm_ctbs_ptn = "\\-bot$", check_urls = TRUE, quiet = FALSE) { @@ -96,6 +99,7 @@ get_contributors <- function (org, repo, } ctbs <- rbind (ctb_code, issue_authors, issue_contributors) + ctbs <- ctbs [which (!grepl (ctbs_ptn, ctbs$logins)), ] if (check_urls) { ctbs <- check_github_urls (ctbs, quiet = quiet) diff --git a/codemeta.json b/codemeta.json index 0756785..9ba1ca2 100644 --- a/codemeta.json +++ b/codemeta.json @@ -7,7 +7,7 @@ "codeRepository": "https://github.com/ropensci/allcontributors", "issueTracker": "https://github.com/ropensci/allcontributors/issues", "license": "https://spdx.org/licenses/GPL-3.0", - "version": "0.2.2.008", + "version": "0.2.2.009", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R",