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

Consider supporting markdown output using the new $GITHUB_STEP_SUMMARY variable #173

Open
baronfel opened this issue May 9, 2022 · 8 comments
Labels
enhancement New feature or request

Comments

@baronfel
Copy link

baronfel commented May 9, 2022

Hello!

In lieu of the two-step process required now, I would love to see an option for raw markdown output using the newly-announced job summaries support from GitHub! I think that would be an easy way to get started and accomplish a lot of the use cases for this tool.

In any case, thank you for your work!

@STRRL
Copy link

STRRL commented May 12, 2022

I think it might resolve #67

@ryanhubbell
Copy link

This is confirmed to work better. I did it for another action to produce android lint results. It has the nice effect of not caring if the run is manually kicked off or not, and will always show up.

However, I found the helper methods they include in core.summary to be more annoying than anything. I ended up just feeding the produced markdown into core.summary.addRaw(), and it works well.

Here is an example (don't mind the failing job here): https://github.com/HubbellCorp/SweetBlue/actions/runs/2341111644

However, one caveat is that I haven't got links to work yet. You can construct the baseUrl like this:

function getBaseUrl(): string {
  const runId = github.context.runId
  const repo = github.context.repo
  return `https://github.com/${repo.owner}/${repo.repo}/actions/runs/${runId}`
}

This may be wrong though, because while the links look right, they are not actually jumping to the anchors (it could also be a bug in my markdown generation code though).

@xt0rted
Copy link

xt0rted commented May 18, 2022

@ryanhubbell the link IDs are prefixed with user-content-, so the url for MissingPermission should be https://github.com/HubbellCorp/SweetBlue/actions/runs/2341111644#user-content-c0-0 etc.

This might be the source of the issue https://github.com/iDevicesInc/action-android-lint/blob/48a041c67386da99819fb2113ba4e3f2f2ecd71d/src/utils/slugger.ts#L14

@ryanhubbell
Copy link

ryanhubbell commented May 18, 2022

That was copied from this very repo. If you look in the src here, it's the same. I should say, the links worked fine when using the check run approach that is currently used by this repo.

@xt0rted
Copy link

xt0rted commented May 18, 2022

This looks like a bug on the summary page. I opened a discussion about it.

@chapmanc
Copy link

chapmanc commented Jul 13, 2022

Just checking if there was any movement on this. Would love this to be implemented since we run scheduled jobs and are missing the output currently. cc: @dorny

@dorny
Copy link
Owner

dorny commented Aug 18, 2022

Sorry guys, I was not maintaining the project for several months. Just getting back to it...
I will definitely look into job summaries. The feature was not available back when I worked on this action.

@dorny dorny added the enhancement New feature or request label Aug 18, 2022
@jussikuosa
Copy link

Hello, we run scheduled E2E tests and this would be a massively useful feature for us since we're not looking for PR checks 🤞 I can help test this if needed.

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

7 participants