Skip to content

Commit

Permalink
Update form of codecov URL
Browse files Browse the repository at this point in the history
Learned about this from urlchecker
  • Loading branch information
jennybc committed Jul 28, 2024
1 parent 1b911ce commit 822e590
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion R/coverage.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ use_covr_ignore <- function(files) {
}

use_codecov_badge <- function(repo_spec) {
url <- glue("https://codecov.io/gh/{repo_spec}")
url <- glue("https://app.codecov.io/gh/{repo_spec}")
img <- glue("https://codecov.io/gh/{repo_spec}/graph/badge.svg")
use_badge("Codecov test coverage", url, img)
}
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ knitr::opts_chunk$set(
[![CRAN status](https://www.r-pkg.org/badges/version/usethis)](https://CRAN.R-project.org/package=usethis)
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![.github/workflows/R-CMD-check](https://github.com/r-lib/usethis/actions/workflows/.github/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-lib/usethis/actions/workflows/.github/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/r-lib/usethis/graph/badge.svg)](https://codecov.io/gh/r-lib/usethis)
[![Codecov test coverage](https://codecov.io/gh/r-lib/usethis/graph/badge.svg)](https://app.codecov.io/gh/r-lib/usethis)
<!-- badges: end -->

usethis is a workflow package: it automates repetitive tasks that arise during project setup and development, both for R packages and non-package projects.
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ status](https://www.r-pkg.org/badges/version/usethis)](https://CRAN.R-project.or
stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![.github/workflows/R-CMD-check](https://github.com/r-lib/usethis/actions/workflows/.github/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-lib/usethis/actions/workflows/.github/workflows/R-CMD-check.yaml)
[![Codecov test
coverage](https://codecov.io/gh/r-lib/usethis/graph/badge.svg)](https://codecov.io/gh/r-lib/usethis)
coverage](https://codecov.io/gh/r-lib/usethis/graph/badge.svg)](https://app.codecov.io/gh/r-lib/usethis)
<!-- badges: end -->

usethis is a workflow package: it automates repetitive tasks that arise
Expand Down Expand Up @@ -61,8 +61,8 @@ library(usethis)
# Create a new package -------------------------------------------------
path <- file.path(tempdir(), "mypkg")
create_package(path)
#> βœ” Creating '/tmp/RtmpMuqeSm/mypkg/'.
#> βœ” Setting active project to "/private/tmp/RtmpMuqeSm/mypkg".
#> βœ” Creating '/tmp/Rtmpyt1hd6/mypkg/'.
#> βœ” Setting active project to "/private/tmp/Rtmpyt1hd6/mypkg".
#> βœ” Creating 'R/'.
#> βœ” Writing 'DESCRIPTION'.
#> Package: mypkg
Expand All @@ -75,13 +75,13 @@ create_package(path)
#> license
#> Encoding: UTF-8
#> Roxygen: list(markdown = TRUE)
#> RoxygenNote: 7.3.1
#> RoxygenNote: 7.3.2
#> βœ” Writing 'NAMESPACE'.
#> βœ” Setting active project to "<no active project>".
# only needed since this session isn't interactive
proj_activate(path)
#> βœ” Setting active project to "/private/tmp/RtmpMuqeSm/mypkg".
#> βœ” Changing working directory to '/tmp/RtmpMuqeSm/mypkg/'
#> βœ” Setting active project to "/private/tmp/Rtmpyt1hd6/mypkg".
#> βœ” Changing working directory to '/tmp/Rtmpyt1hd6/mypkg/'

# Modify the description ----------------------------------------------
use_mit_license("My Name")
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
i Badge link will only be printed to screen.
[ ] Copy and paste the following lines into 'README':
<!-- badges: start -->
[![Codecov test coverage](https://codecov.io/gh/OWNER/REPO/graph/badge.svg)](https://codecov.io/gh/OWNER/REPO)
[![Codecov test coverage](https://codecov.io/gh/OWNER/REPO/graph/badge.svg)](https://app.codecov.io/gh/OWNER/REPO)
<!-- badges: end -->

0 comments on commit 822e590

Please sign in to comment.