Skip to content

Commit

Permalink
add info on multiple stages as attr of review data
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Mar 20, 2024
1 parent d7bd4df commit 0a1dd6a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 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.7.005
Version: 0.0.7.006
Authors@R:
person(given = "First",
family = "Last",
Expand Down
29 changes: 18 additions & 11 deletions R/reviews.R
Original file line number Diff line number Diff line change
Expand Up @@ -263,17 +263,20 @@ review_status <- function (open_only = TRUE, browse = TRUE, quiet = FALSE) {
dplyr::relocate (editor, .after = labels) |>
dplyr::relocate (editor_date, .after = editor)

if (any (dat$has_multiple_stages) && !quiet) {
numbers <- dat$number [which (dat$has_multiple_stages)]
txt <- ifelse (
length (numbers) == 1,
"issue currently has",
"issues currently have"
)
warning (
"The following ", txt, " multiple 'stage' labels:\n ",
paste0 (numbers, collapse = ", ")
)
has_multiple_stages <- any (dat$has_multiple_stages)
if (has_multiple_stages) {
multiple_stages <- dat$number [which (dat$has_multiple_stages)]
if (!quiet) {
txt <- ifelse (
length (multiple_stages) == 1,
"issue currently has",
"issues currently have"
)
warning (
"The following ", txt, " multiple 'stage' labels:\n ",
paste0 (multiple_stages, collapse = ", ")
)
}
}

# Collapse list columns:
Expand All @@ -299,6 +302,10 @@ review_status <- function (open_only = TRUE, browse = TRUE, quiet = FALSE) {
print (open_gt_table (dat))
}

if (has_multiple_stages) {
attr (dat, "multiple_stages") <- multiple_stages
}

return (dat)
}

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.7.005",
"version": "0.0.7.006",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down

0 comments on commit 0a1dd6a

Please sign in to comment.