Skip to content

Commit

Permalink
Badges just need codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Oct 30, 2023
1 parent b2a6f4d commit 68efbdb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions R/upkeep.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,15 @@ make_upkeep_issue <- function(year, tidy) {
}
}

checklist <- if (tidy) tidy_upkeep_checklist(year) else upkeep_checklist()
gh <- gh_tr(tr)
if (tidy) {
checklist <- tidy_upkeep_checklist(year, repo_spec = tr$repo_spec)
} else {
checklist <- upkeep_checklist()
}

title_year <- year %||% format(Sys.Date(), "%Y")

gh <- gh_tr(tr)
issue <- gh(
"POST /repos/{owner}/{repo}/issues",
title = glue("Upkeep for {project_name()} ({title_year})"),
Expand Down Expand Up @@ -118,7 +122,8 @@ use_tidy_upkeep_issue <- function(year = NULL) {

tidy_upkeep_checklist <- function(year = NULL,
posit_pkg = is_posit_pkg(),
posit_person_ok = is_posit_person_canonical()) {
posit_person_ok = is_posit_person_canonical(),
repo_spec = "OWNER/REPO") {
year <- year %||% 2000

bullets <- c()
Expand Down Expand Up @@ -165,7 +170,7 @@ tidy_upkeep_checklist <- function(year = NULL,
"### 2022",
"",
todo("Handle and close any still-open `master` --> `main` issues"),
todo("[Update README badges](https://github.com/r-lib/usethis/issues/1594)"),
todo('`usethis:::use_codecov_badge("{repo_spec}")`'),
todo("Update pkgdown site using instructions at <https://tidytemplate.tidyverse.org>"),
todo("Update lifecycle badges with more accessible SVGs: `usethis::use_lifecycle()`"),
""
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/upkeep.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
### 2022
* [ ] Handle and close any still-open `master` --> `main` issues
* [ ] [Update README badges](https://github.com/r-lib/usethis/issues/1594)
* [ ] `usethis:::use_codecov_badge("OWNER/REPO")`
* [ ] Update pkgdown site using instructions at <https://tidytemplate.tidyverse.org>
* [ ] Update lifecycle badges with more accessible SVGs: `usethis::use_lifecycle()`
Expand Down

0 comments on commit 68efbdb

Please sign in to comment.