Skip to content

Commit 5128f40

Browse files
check existing benchmarks
1 parent 9d6d373 commit 5128f40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bench/01-declarations.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ plot_against_base <- function(new_bm,
1313
last_commit_base_branch <- branches[branches$name == Sys.getenv("GITHUB_BASE_REF"), "commit", drop = TRUE]
1414
bm <- bench::cb_read()
1515
commit_is_reference <- bm$commit_hash == last_commit_base_branch
16-
if (any(commit_is_reference) && Sys.getenv("GITHUB_BASE_REF") != "") {
16+
if (any(commit_is_reference) && Sys.getenv("GITHUB_BASE_REF") != "" && !is.null(bm) && nrow(bm) > 0) {
1717
# if a pull request
1818
reference <- bm[commit_is_reference, "benchmarks"][[1]][[1]] %>%
1919
dplyr::filter(.data$name %in% !!name)

0 commit comments

Comments
 (0)