Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybc committed Jul 28, 2024
1 parent 3dd0562 commit 34f745e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions R/github-actions.R
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 34f745e

Please sign in to comment.