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

GitHub Actions: Translate warnings and errors to workflow commands #50

Closed
zkamvar opened this issue Dec 23, 2020 · 1 comment
Closed
Labels
enhancement New feature or request

Comments

@zkamvar
Copy link
Contributor

zkamvar commented Dec 23, 2020

https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message

I've found it helpful in pull requests when warnings and errors label the lines where an error is found. This is achieved in GitHub Actions via workflow commands that are strings output to stdout that start with ::.

For example, this warning was generated from this workflow command:

::warning file=episodes/01-introduction.Rmd,line=10,col=5::This is a warning
@ErinBecker
Copy link
Contributor

This has been implemented, as demonstrated by the output below showing an error message for image missing alt text.

── Validating Fenced Divs ──────────────────────────────────────────────────────
── Validating Internal Links and Images ────────────────────────────────────────
! There were errors in 1/123 images
◌ Images need alt-text <https://webaim.org/techniques/hypertext/link_text#alt_link>

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

No branches or pull requests

3 participants