-
Notifications
You must be signed in to change notification settings - Fork 158
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
feat: add markdown output format to stats command #1395
Conversation
🦋 Changeset detectedLatest commit: 704ba35 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Coverage report
Test suite run success699 tests passing in 100 suites. Report generated by 🧪jest coverage report action from 704ba35 |
Note: a list rather than tables because the tables would use a helper, which would add dependencies and maybe make the output less reusable. It's up for discussion though. |
2981a47
to
7c355bb
Compare
Thank you for the MR! Will take a closer look at this soon. |
Updated to reinstate the timing output for the stylish format. |
Fine by me. We can always improve the output format later.
I don't think so. It's easy to describe a table in MD format without extra helpers. All you need to do is replace this: `- ${metric}: ${total}` with this: `| ${metric} | ${total} |` Am I missing something? |
Hmm, maybe I should give that a go. I was taking the helper information from this article: https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/ |
c145af3
to
bcb1af1
Compare
e546d64
to
c0055de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thank you!
What/Why/How?
I was answering a question about JSON format output containing not-JSON elements, and I also noticed #976 requesting markdown format output that could be used in other contexts, such as GitHub Job Sumaries.
So this pull request removes the output about which file is being
stat
-ed from being displayed by default - the stylish format keeps it as that one is human readable. The execution time output is also removed, this isn't used in all commands and breaks the other file formats such as JSON.The pull request also adds a
--format=markdown
option to thestats
command, to produce a markdown output. The original request was for the GitHub Job Summaries, but the format is generic markdown that could also be used elsewhere.Example:
Check yourself
Security