[github action] display black result in job summary#3688
Merged
cooperlees merged 5 commits intopsf:mainfrom May 15, 2023
Merged
[github action] display black result in job summary#3688cooperlees merged 5 commits intopsf:mainfrom
cooperlees merged 5 commits intopsf:mainfrom
Conversation
cooperlees
requested changes
May 13, 2023
Collaborator
cooperlees
left a comment
There was a problem hiding this comment.
Just checking if we should care about the new lines, I feel it might mess up output people maybe parse and make things harder to read ...
action/main.py
Outdated
| break | ||
| if not describe_name: | ||
| print("::error::Failed to detect action version.", flush=True) | ||
| sys.stderr.write("::error::Failed to detect action version.") |
Collaborator
There was a problem hiding this comment.
Do we care about the newline here you've removed? If so I recommend sticking with print cause I believe it will send correct newline in windows ...
Suggested change
| sys.stderr.write("::error::Failed to detect action version.") | |
| print("::error::Failed to detect action version.", file=sys.stderr, flush=True) |
Contributor
Author
Contributor
Author
|
I also checked action was correctly running on a Windows runner, an example run is here https://github.com/tieum/atuin-graph/actions/runs/4972553308
|
cooperlees
approved these changes
May 14, 2023
Collaborator
cooperlees
left a comment
There was a problem hiding this comment.
Thanks for taking my suggestions into account. This all looks good to me now to get the nicer summary and does the right thing to stderr output for all platforms :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
This PR updates the black github action to display the output of black in the job summary
Checklist
CHANGES.mdif necessary?Result looks like this:
- erroring with verbosity on
- success with verbosity off