Skip to content

Commit

Permalink
enable editors to be both general and stats
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Mar 20, 2024
1 parent 7782fa2 commit 3d57931
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 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.1.0.001
Version: 0.1.0.002
Authors@R:
person(given = "First",
family = "Last",
Expand Down
5 changes: 5 additions & 0 deletions R/editors.R
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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]
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.1.0.001",
"version": "0.1.0.002",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
4 changes: 2 additions & 2 deletions quarto/editors.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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) |>
Expand All @@ -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 (
Expand Down

0 comments on commit 3d57931

Please sign in to comment.