Skip to content

Commit

Permalink
Add clickable urls (and convert unclickable path to .val!
Browse files Browse the repository at this point in the history
  • Loading branch information
olivroy committed Dec 7, 2023
1 parent ddbf876 commit be8a0f0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/create.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ create_project <- function(path,
} else {
ui_done("Writing a sentinel file {ui_path('.here')}")
ui_todo("Build robust paths within your project via {ui_code('here::here()')}")
ui_todo("Learn more at <https://here.r-lib.org>")
ui_todo("Learn more at {.url https://here.r-lib.org}")
file_create(proj_path(".here"))
}

Expand Down
5 changes: 3 additions & 2 deletions R/github-actions.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ use_github_action <- function(name = NULL,
}

if (!is.null(readme)) {
ui_todo("Learn more at <{readme}>.")
ui_todo("Learn more at {.url {readme}}.")
}

badge <- badge %||% is_check_action(url)
Expand Down Expand Up @@ -215,7 +215,7 @@ use_github_actions_badge <- function(name = "R-CMD-check.yaml",
use_tidy_github_actions <- function(ref = NULL) {
repo_spec <- target_repo_spec()

use_github_action("check-full.yaml", ref = ref, badge = TRUE)
use_github_action("check-full", ref = ref, badge = TRUE)

use_github_action("pr-commands", ref = ref)
use_github_action("pkgdown", ref = ref)
Expand All @@ -231,6 +231,7 @@ use_tidy_github_actions <- function(ref = NULL) {
"Remove existing {ui_path('.travis.yml')} and {ui_path('appveyor.yml')}?"
)) {
file_delete(old_configs[has_appveyor_travis])
# TODO maybe add ui_path("README.Rmd")?
ui_todo("Remove old badges from README")
}
}
Expand Down
2 changes: 1 addition & 1 deletion R/use_github_file.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ use_github_file <- function(repo_spec,

ref_string <- if (is.null(ref)) "" else glue("@{ref}")
github_string <- glue("{repo_spec}/{path}{ref_string}")
ui_done("Saving {ui_path(github_string)} to {ui_path(save_as)}")
ui_done("Saving {ui_value(github_string)} to {ui_path(save_as)}")

lines <- read_github_file(
repo_spec = repo_spec,
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/github-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
v Adding "^\\.github$" to '.Rbuildignore'
v Adding "*.html" to '.github/.gitignore'
v Creating '.github/workflows/'
v Saving 'r-lib/actions/examples/check-full.yaml@v2' to '.github/workflows/R-CMD-check.yaml'
v Saving "r-lib/actions/examples/check-full.yaml@v2" to '.github/workflows/R-CMD-check.yaml'
* Learn more at <https://github.com/r-lib/actions/blob/v2/examples/README.md>.
v Adding R-CMD-check badge to 'README.md'

Expand Down

0 comments on commit be8a0f0

Please sign in to comment.