-
Notifications
You must be signed in to change notification settings - Fork 6
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 summary to action job #62
base: main
Are you sure you want to change the base?
Conversation
.addList( | ||
errors.map( | ||
(error) => | ||
`🔴 Line ${error.line}: ${error.ruleId} - ${error.description}` | ||
) | ||
) |
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.
I wonder if you could consider eslint stylish formatter style here? I guess this format will be more familiar to the community.
If it's not very late, I'd also use the the same format in action logs
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.
I can ask the team and see what their thoughts were on this. I don't see why this would be an issue
// Create GitHub annotations | ||
for (const error of errors) { | ||
core.error( | ||
`${file}:${error.line} - ${error.ruleId} - ${error.description}`, |
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.
file:line
looks redundant here, GH annotation will display this info anyway since you provide it in the options
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.
So this is defined in both GH annotations but also in the workflow itself. Without the file and line number the error is not too helpful
Ref: #60
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.
If you output errors in eslint stylish format, you don't need to manually create annotations, you can rely on GH Problem Matchers:
=>
- readable errors in workflow logs
- annotations without redundancy
This PR adds a summary to the job
![image](https://private-user-images.githubusercontent.com/45568605/412989491-71b7d80e-5813-4e34-8ab1-46261b49c899.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTQxNDMsIm5iZiI6MTczOTU5Mzg0MywicGF0aCI6Ii80NTU2ODYwNS80MTI5ODk0OTEtNzFiN2Q4MGUtNTgxMy00ZTM0LThhYjEtNDYyNjFiNDljODk5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDA0MzA0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE0MGRmODhhOGZjOTEyNjYwMTE3NTA5N2Q4Zjc5ZjdjZDA4MDk0ZDcwNzdkMjYxMDgwYWIzZGY5OTZmMWFjNTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.k79Nhv8DwqBMa0K5bXPPva2hYMra_UKylulqsYpgkRI)
ex:
qa notes: make sure that a summary exist similar to the screenshot above when errors are found