From 34f745eabf6cf2161073896cac01085f1ef46f3f Mon Sep 17 00:00:00 2001 From: Jenny Bryan Date: Sun, 28 Jul 2024 11:48:29 -0700 Subject: [PATCH] Tweaks --- R/github-actions.R | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/R/github-actions.R b/R/github-actions.R index ce150ec0f..91bf90bd8 100644 --- a/R/github-actions.R +++ b/R/github-actions.R @@ -123,13 +123,11 @@ use_github_action <- function(name = NULL, if (!is.null(readme)) { ui_bullets(c("_" = "Learn more at {.url {readme}}.")) } - badge0 <- badge - badge <- badge0 %||% is_check_action(url) - if (badge) { + + if (badge %||% is_check_action(url)) { use_github_actions_badge(path_file(save_as)) } - badge <- badge0 %||% is_coverage_action(url) - if (badge) { + if (badge %||% is_coverage_action(url)) { use_codecov_badge(target_repo_spec()) } @@ -172,7 +170,7 @@ is_check_action <- function(url) { } is_coverage_action <- function(url) { - grepl("coverage", path_file(url)) + grepl("test-coverage", path_file(url)) } #' Generates a GitHub Actions badge