urlchecker-action
urlchecker-action copied to clipboard
Should the action also output a Markdown report in a check run?
See https://developer.github.com/v3/checks/runs/#output-object
And e.g. https://github.com/ropensci/dev_guide/pull/258/checks?check_run_id=555253517
It'd be something nicer to read than the log.
Not sure if very useful. I thought of this when seeing other link checker actions mentioning "Markdown reports".
Another advantage of a Markdown report that'd e.g. be
Found 3 broken links.
# In content/file1.md
[https://broken.com](https://broken.com)
[https://broken2.com](https://broken2.com)
Links would be clickable so it's easier to double check (which is the first thing I'd do to fix a broken link, trying to navigate to it).
Or it could be organized by URL (if they appear in several files).
I wonder whether the report should also make filenames clickable (to directly see where in the source the problem is.
The API also has https://developer.github.com/v3/checks/runs/#annotations-object but I don't know whether it can be used in a workflow launched from a PR from a fork for instance.
End of suggestion :-)
I’m not sure that I follow - aside from an output in markdown, can you show me real examples in the wild for what you are looking for?
I like the idea cuz it is super practical :smile: The cool thing about .csv
is that we can easily convert it to almost any other format including .md
. As for the report, making everything clickable is always better for the user.
The API looks useful, but we should test it first or find examples of it, because I wonder how would the output look like?
https://github.com/ropensci/dev_guide/runs/555253517?check_suite_focus=true is generated from https://github.com/ropensci/dev_guide/blob/4a67a67e234ef5cd02e82877feb01ed2444bf1f7/.github/workflows/pr.yml#L56
In the case of this action, the check wouldn't be created but updated. I have never done that.
The example is for "output object"
https://github.com/krzkaczor/lighthouse-keeper-example/pull/2/checks
https://github.com/treosh/lighthouse-ci-action/issues/2#issuecomment-568706564
The last link is a quite helpful. Not only it shows that we can display the report as markdown but also it gives an idea on what improvements we can have for the logs too. @vsoch what do you think of it? :)
I wasn't able to find more links, maybe it is under used/ documented or I am using wrong keywords.
For the first example (the less useful one) that is a workflow of mine where I just tried out API params from the docs to see where the "output object" would show up, I had no idea!
Hmm, so this I need to think about. It's not that the idea isn't cool, but it requires enabling checks which might be one step too many, and mean that the urlchecker-action doesn't work off the bat for most that don't know to do this (which is a very bad thing to set up). I also don't totally see the benefit of having a markdown with links that are broken? Why would someone want to click a broken link? So my 0.02 - let's keep this open and think of a strong use case for it, and if we find that, then circle back to talk about it. I don't think we have a strong use case yet, and the drawbacks that it adds to require checks are more substantial.
Not a strong use case but if you give me a list of potentially broken URLs in my content I'll
- try to open them just to check they're indeed broken;
- copy-paste them to look for them in my files (but not that much easier from Markdown "copy link" than from the log double-click I guess).