From 3d57931df17ed0d04261155e40ed744c73f66def Mon Sep 17 00:00:00 2001 From: mpadge Date: Wed, 20 Mar 2024 15:53:55 +0100 Subject: [PATCH] enable editors to be both general and stats --- DESCRIPTION | 2 +- R/editors.R | 5 +++++ codemeta.json | 2 +- quarto/editors.qmd | 4 ++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 193fa33..198f9bc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: dashboard Title: What the Package Does (One Line, Title Case) -Version: 0.1.0.001 +Version: 0.1.0.002 Authors@R: person(given = "First", family = "Last", diff --git a/R/editors.R b/R/editors.R index 1b49f70..edf3af0 100644 --- a/R/editors.R +++ b/R/editors.R @@ -24,6 +24,10 @@ editor_gh_data <- function (quiet = FALSE) { editors_stats <- editors_stats [which (!editors_stats %in% editors$login)] editors <- rbind (editors, data.frame (login = editors_stats, stats = TRUE)) + editors$general <- !editors$stats + also_gen <- c ("adamhsparks", "mpadge") + editors$general [editors$login %in% also_gen] <- TRUE + has_next_page <- TRUE end_cursor <- NULL @@ -154,6 +158,7 @@ editor_latest_issue <- function (editors, assignees, number, data.frame ( editor = editors$login, stats = editors$stats, + general = editors$general, number = number [ed_index], state = state [ed_index], updated_at = updated_at [ed_index] diff --git a/codemeta.json b/codemeta.json index c977231..3ed9be6 100644 --- a/codemeta.json +++ b/codemeta.json @@ -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.1.0.001", + "version": "0.1.0.002", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R", diff --git a/quarto/editors.qmd b/quarto/editors.qmd index c333329..be5624a 100644 --- a/quarto/editors.qmd +++ b/quarto/editors.qmd @@ -73,7 +73,7 @@ ed_status <- dplyr::filter (ed_status, editor != "haozhu233") |> ```{r editor-table, echo = FALSE} #| label: fig-editors-general -ed_dat_gen <- ed_status [which (!ed_status$stats), ] +ed_dat_gen <- ed_status [which (ed_status$general), ] ed_dat_gen$status <- factor (ed_dat_gen$status, levels = c ("FREE", "BUSY", "ON LEAVE")) ed_dat_gen <- dplyr::group_by (ed_dat_gen, status) |> dplyr::arrange (dplyr::desc (inactive_days), .by_group = TRUE) |> @@ -92,7 +92,7 @@ gt::gt ( groupname_col = "status" ) |> gt::tab_header ("Editor Status Overview") |> - gt::cols_hide (c (stats, inactive_days, number, state)) |> + gt::cols_hide (c (stats, general, inactive_days, number, state)) |> gt::tab_style ( style = list (gt::cell_fill (color = "#FFFF8088")), locations = gt::cells_body (