Skip to content
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

Refresh use_github_actions_badge() #1525

Closed
jennybc opened this issue Oct 20, 2021 · 2 comments
Closed

Refresh use_github_actions_badge() #1525

jennybc opened this issue Oct 20, 2021 · 2 comments

Comments

@jennybc
Copy link
Member

jennybc commented Oct 20, 2021

This commit (hadley/r-pkgs@de6a391) shows the difference between the badge created by use_github_actions_badge() versus what "Create status badge" does via ... in GitHub Actions.

@jennybc
Copy link
Member Author

jennybc commented Oct 24, 2021

Seems pretty authoritative re: the general form of the badge links:

https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge

@jennybc
Copy link
Member Author

jennybc commented Dec 16, 2021

GitHub will create the markup for a GHA badge like so: visit repo > Actions > specific workflow > ... > Create status badge > Copy status badge Markdown.

For r-lib/usethis and the R-CMD-check workflow, that gives:

[![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)

Let's compare that to what use_github_actions_badge() currently does.

In terms of the URL for the .svg:

we currently do: https://github.com/r-lib/usethis/workflows/R-CMD-check/badge.svg
GitHub suggests: https://github.com/r-lib/usethis/actions/workflows/R-CMD-check.yaml/badge.svg

To be clear, our .svg URLs do work, but it's probably best to fall in line with what seems to be more official / current.

In terms of what the badge links to:

we currently do: https://github.com/r-lib/usethis/actions
GitHub suggests: https://github.com/r-lib/usethis/actions/workflows/R-CMD-check.yaml

Both links take you to a repo's GitHub Actions page, but GitHub's more specific link pre-filters the runs that you see in the main right-hand panel. It's still very easy to click around to other workflows, e.g. pkgdown or test-coverage, in the left-hand panel.

I think use_github_actions_badge() should sync up with what the "GHA badge helper" suggests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant