Skip to content

Commit

Permalink
add 'quiet' param
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Mar 7, 2024
1 parent 0f91bf5 commit 553ab31
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: dashboard
Title: What the Package Does (One Line, Title Case)
Version: 0.0.1.002
Version: 0.0.1.003
Authors@R:
person(given = "First",
family = "Last",
Expand Down
18 changes: 11 additions & 7 deletions R/editors.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#' Get current status of all rOpenSci editors.
#'
#' @param quiet If `FALSE`, display progress information on screen.
#' @return (Invisibly) A `data.frame` with one row per editor and some key
#' statistics.
#' @noRd
editor_gh_data <- function () {
editor_gh_data <- function (quiet = FALSE) {

q <- gh_editors_team_qry (stats = FALSE)
editors <- gh::gh_gql (query = q)
Expand Down Expand Up @@ -72,10 +73,12 @@ editor_gh_data <- function () {
)

page_count <- page_count + 1L
message (
"Retrieved page [", page_count, "] to issue number [",
max (number), "]"
)
if (!quiet) {
message (
"Retrieved page [", page_count, "] to issue number [",
max (number), "]"
)
}
}

# Reduce only to issues assigned to "editors" team members:
Expand Down Expand Up @@ -113,11 +116,12 @@ editor_gh_data <- function () {

#' Generate a summary report of current state of all rOpenSci editors
#'
#' @param quiet If `FALSE`, display progress information on screen.
#' @return A `data.frame` with one row per issue and some key statistics.
#' @export

editor_status <- function () {
dat <- editor_gh_data ()
editor_status <- function (quiet = FALSE) {
dat <- editor_gh_data (quiet = quiet)

dat$status <- "FREE"
dat$status [dat$state == "OPEN"] <- "BUSY"
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "dashboard: What the Package Does (One Line, Title Case)",
"codeRepository": "https://github.com/ropensci-review-tools/dashboard",
"license": "https://spdx.org/licenses/MIT",
"version": "0.0.1.002",
"version": "0.0.1.003",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
5 changes: 4 additions & 1 deletion man/editor_status.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 553ab31

Please sign in to comment.