Skip to content

Commit

Permalink
Fix listing in-progress checks
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Mar 25, 2019
1 parent 88b1666 commit 3681c7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions R/column-result.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,18 @@ column_result <- function(x) {
#' @export

pillar_shaft.rhub_column_result <- function(x, ...) {

cx <- lapply(x, color_column_result)
new_pillar_shaft_simple(cx, ...)
}

color_column_result <- function(x) {
if (is.null(x)) return("in-progress")
E <- if (n <- length(x$errors)) status_style_error(strrep("E", n))
W <- if (n <- length(x$warnings)) status_style_error(strrep("W", n))
N <- if (n <- length(x$notes)) status_style_note(strrep("N", n))

switch(
x$status,
created = "???",
"in-progress" = "???",
"parseerror" = status_style_error("parseerror"),
"preperror" = status_style_error("preperror"),
"aborted" = status_style_aborted("aborted"),
Expand Down
2 changes: 1 addition & 1 deletion R/list.R
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ make_check_list <- function(response) {
id = column_id(map_chr(data, "[[", "id")),
platform_name = map_chr(data, function(x) x$platform$name),
build_time = column_dt(map_int(data, function(x) {
suppressWarnings(as.integer(x$build_time)) %||% NA_integer_
suppressWarnings(as.integer(x$build_time %||% NA_integer_))
})),
submitted = column_time(map_chr(data, "[[", "submitted")),
started = column_time(map_chr(data, function(x) x$started %||% NA_character_)),
Expand Down

0 comments on commit 3681c7c

Please sign in to comment.