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

feat: add summary to action job #62

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

feat: add summary to action job #62

wants to merge 5 commits into from

Conversation

michael-siek
Copy link
Member

This PR adds a summary to the job
ex:
image

qa notes: make sure that a summary exist similar to the screenshot above when errors are found

@michael-siek michael-siek requested a review from a team as a code owner February 13, 2025 17:00
@michael-siek michael-siek changed the title Summary feat: add summary to action job Feb 13, 2025
Comment on lines +76 to +81
.addList(
errors.map(
(error) =>
`🔴 Line ${error.line}: ${error.ruleId} - ${error.description}`
)
)

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

Copy link
Member Author

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}`,

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

Copy link
Member Author

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

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:

=>

  1. readable errors in workflow logs
  2. annotations without redundancy

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

Successfully merging this pull request may close these issues.

2 participants