Commit 4e66530 1 parent cc1ac60 commit 4e66530 Copy full SHA for 4e66530
File tree 4 files changed +15
-9
lines changed
4 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ use_covr_ignore <- function(files) {
44
44
use_codecov_badge <- function (repo_spec ) {
45
45
default_branch <- git_default_branch()
46
46
url <- glue(" https://app.codecov.io/gh/{repo_spec}?branch={default_branch}" )
47
- img <- glue(" https://codecov. io/gh/{repo_spec}/branch/{default_branch}/graph/badge.svg " )
47
+ img <- glue(" https://img.shields. io/codecov/c/github/{repo_spec}?label=test%20coverage&logo=codecov " )
48
48
use_badge(" Codecov test coverage" , url , img )
49
49
}
50
50
Original file line number Diff line number Diff line change @@ -73,15 +73,20 @@ use_github_actions <- function() {
73
73
# ' @rdname github_actions
74
74
use_github_actions_badge <- function (name = " R-CMD-check.yaml" ,
75
75
repo_spec = NULL ) {
76
+ name_no_ext <- path_ext_remove(name )
76
77
if (path_ext(name ) == " " ) {
77
78
name <- path_ext_set(name , " yaml" )
78
79
}
80
+ name_enc <- utils :: URLencode(name )
81
+ name_no_ext_enc <- utils :: URLencode(name_no_ext )
82
+ badge_label <- glue(" {name_no_ext} GitHub Action status" )
83
+
79
84
repo_spec <- repo_spec %|| % target_repo_spec()
80
- enc_name <- utils :: URLencode(name )
81
- img <- glue(" https://github.com/{repo_spec}/actions/workflows/{enc_name}/badge.svg" )
82
- url <- glue(" https://github.com/{repo_spec}/actions/workflows/{enc_name}" )
83
85
84
- use_badge(path_ext_remove(name ), url , img )
86
+ img <- glue(" https://img.shields.io/github/workflow/status/{repo_spec}/{name_no_ext_enc}?label={name_no_ext_enc}&logo=github" )
87
+ url <- glue(" https://github.com/{repo_spec}/actions/workflows/{name_enc}" )
88
+
89
+ use_badge(badge_label , url , img )
85
90
}
86
91
87
92
uses_github_actions <- function () {
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ knitr::opts_chunk$set(
16
16
# usethis <img src =" man/figures/logo.png " align =" right " height =" 139 " />
17
17
18
18
<!-- badges: start -->
19
- [ ![ R-CMD-check] ( https://github.com/ r-lib/usethis/actions/workflows/ R-CMD-check.yaml/badge.svg )] ( https://github.com/r-lib/usethis/actions/workflows/R-CMD-check.yaml )
20
- [ ![ Codecov test coverage] ( https://codecov. io/gh/ r-lib/usethis/branch/main/graph/badge.svg )] ( https://app.codecov.io/gh/r-lib/usethis?branch=main )
19
+ [ ![ R-CMD-check GitHub Action status ] ( https://img.shields.io/github/workflow/status/ r-lib/usethis/R-CMD-check?label=R-CMD-check&logo=github )] ( https://github.com/r-lib/usethis/actions/workflows/R-CMD-check.yaml )
20
+ [ ![ Codecov test coverage] ( https://img.shields. io/codecov/c/github/ r-lib/usethis?label=test%20coverage&logo=codecov )] ( https://app.codecov.io/gh/r-lib/usethis?branch=main )
21
21
[ ![ CRAN status] ( https://www.r-pkg.org/badges/version/usethis )] ( https://CRAN.R-project.org/package=usethis )
22
22
[ ![ Lifecycle: stable] ( https://img.shields.io/badge/lifecycle-stable-brightgreen.svg )] ( https://lifecycle.r-lib.org/articles/stages.html#stable )
23
23
<!-- badges: end -->
Original file line number Diff line number Diff line change 5
5
6
6
<!-- badges: start -->
7
7
8
- [ ![ R-CMD-check] ( https://github.com/r-lib/usethis/actions/workflows/R-CMD-check.yaml/badge.svg )] ( https://github.com/r-lib/usethis/actions/workflows/R-CMD-check.yaml )
8
+ [ ![ R-CMD-check GitHub Action
9
+ status] ( https://img.shields.io/github/workflow/status/r-lib/usethis/R-CMD-check?label=R-CMD-check&logo=github )] ( https://github.com/r-lib/usethis/actions/workflows/R-CMD-check.yaml )
9
10
[ ![ Codecov test
10
- coverage] ( https://codecov. io/gh/ r-lib/usethis/branch/main/graph/badge.svg )] ( https://app.codecov.io/gh/r-lib/usethis?branch=main )
11
+ coverage] ( https://img.shields. io/codecov/c/github/ r-lib/usethis?label=test%20coverage&logo=codecov )] ( https://app.codecov.io/gh/r-lib/usethis?branch=main )
11
12
[ ![ CRAN
12
13
status] ( https://www.r-pkg.org/badges/version/usethis )] ( https://CRAN.R-project.org/package=usethis )
13
14
[ ![ Lifecycle:
You can’t perform that action at this time.
0 commit comments