-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to update badges #1594
Comments
This was referenced Feb 28, 2022
23 tasks
24 tasks
23 tasks
24 tasks
Should we wait on #1554 before doing this systematically? |
Sure. I don't see any urgency around this. (Although I have been doing it whenever I work on a package.) |
24 tasks
23 tasks
24 tasks
This was referenced Mar 2, 2022
Closed
This was referenced Mar 2, 2022
This was referenced Mar 3, 2022
Closed
24 tasks
This was referenced May 1, 2023
34 tasks
35 tasks
32 tasks
33 tasks
37 tasks
33 tasks
This was referenced Oct 30, 2023
36 tasks
33 tasks
This was referenced Oct 31, 2023
This was referenced Oct 31, 2023
36 tasks
11 tasks
37 tasks
37 tasks
This was referenced Oct 31, 2023
35 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The recommended badge snippet for GHA and Codecov has changed over time.
The dev version of usethis produces badges that match what GitHub's and Codecov's official badge helpers provide now.
If you have old badge syntax (which still seems to work, BTW), but you want to update, here's how.
Note that the Codecov badge update will be prompted by
urlchecker::url_check()
, i.e. you're going to have to do this one anyway, eventually.This is a little fiddly, given how low impact it is. Our current/old badges do work, at least for the moment. But here's the deal anyway.
Reasons to update badges:
master
-->main
.This requires dev usethis. The GHA update in question happened in aa510ec.
Pick one, to update GHA R-CMD-check badge:
use_tidy_github_actions()
inserts an updated GHA badge in README, while doing its main job.use_github_actions_badge("R-CMD-check")
just inserts a badge.To update a Codecov badge, you have to call an internal helper via
:::
:usethis:::use_codecov_badge("OWNER/SPEC")
, e.g.usethis:::use_codecov_badge("r-lib/gh")
Before committing new badges:
README.[R]?md
, delete the old. Move the new into desired place.README.Rmd
withdevtools::build_readme()
.R-CMD-check
badge:Old svg:
...OWNER/REPO/workflows/R-CMD-check/badge.svg
New svg:
...OWNER/REPO/actions/workflows/R-CMD-check.yaml/badge.svg
Old URL:
...OWNER/REPO/actions
New URL:
...OWNER/REPO/actions/workflows/R-CMD-check.yaml
Codecov test coverage badge:
Old svg: probably mentions
master
New svg: probably should mention
main
Old URL:
https://codecov.io/gh/OWNER/REPO?branch=master
New URL:
https://app.codecov.io/gh/OWNER/REPO?branch=main
The text was updated successfully, but these errors were encountered: