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

Should the action also output a Markdown report in a check run? #61

Open
maelle opened this issue Apr 15, 2020 · 11 comments
Open

Should the action also output a Markdown report in a check run? #61

maelle opened this issue Apr 15, 2020 · 11 comments

Comments

@maelle
Copy link
Contributor

maelle commented Apr 15, 2020

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".

@maelle
Copy link
Contributor Author

maelle commented Apr 15, 2020

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 :-)

@vsoch
Copy link
Collaborator

vsoch commented Apr 15, 2020

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?

@SuperKogito
Copy link
Member

I like the idea cuz it is super practical 😄 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?

@maelle
Copy link
Contributor Author

maelle commented Apr 15, 2020

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.

@maelle
Copy link
Contributor Author

maelle commented Apr 15, 2020

The example is for "output object"

@maelle
Copy link
Contributor Author

maelle commented Apr 15, 2020

@maelle
Copy link
Contributor Author

maelle commented Apr 15, 2020

@SuperKogito
Copy link
Member

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? :)

@maelle
Copy link
Contributor Author

maelle commented Apr 15, 2020

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!

@vsoch
Copy link
Collaborator

vsoch commented Apr 15, 2020

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.

@maelle
Copy link
Contributor Author

maelle commented Apr 15, 2020

Not a strong use case but if you give me a list of potentially broken URLs in my content I'll

  1. try to open them just to check they're indeed broken;
  2. 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).

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

3 participants