-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[github action] display black result in job summary #3688
Conversation
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.
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
@@ -32,7 +32,7 @@ | |||
describe_name = line[len("describe-name: ") :].rstrip() | |||
break | |||
if not describe_name: | |||
print("::error::Failed to detect action version.", flush=True) | |||
sys.stderr.write("::error::Failed to detect action version.") |
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.
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 ...
sys.stderr.write("::error::Failed to detect action version.") | |
print("::error::Failed to detect action version.", file=sys.stderr, flush=True) |
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 also checked action was correctly running on a Windows runner, an example run is here https://github.com/tieum/atuin-graph/actions/runs/4972553308 |
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.
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 :)
Description
This PR updates the black github action to display the output of black in the job summary
Checklist
CHANGES.md
if necessary?Result looks like this:
- erroring with verbosity on
- success with verbosity off