-
Notifications
You must be signed in to change notification settings - Fork 28
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
Simplify status checks output for "error" and "unstable" steps #125
base: master
Are you sure you want to change the base?
Simplify status checks output for "error" and "unstable" steps #125
Conversation
In status checks, if the run failed because of an "error" pipeline step, then use the first line of the error message in the title of ChecksOutput, instead of "error in 'error' step". However, keep the original behaviour if the error message does not match the "message" argument of the step, if the step has other arguments, or if the first line of the message is empty. Update the test so that it keeps passing,
In status checks, omit the name and arguments of the "error" or "unstable" step from the output if the error or warning message matches the "message" argument of the step and there are no other arguments. Update the tests so that they keep passing.
This needs a new test for the case where the arguments of the step are still displayed. Although one test already runs |
I probably won't continue this before 2021-09-18. |
if (message != null) { | ||
final String firstLine = message.split("\r?\n", 2)[0]; | ||
if (!firstLine.isEmpty()) { | ||
return firstLine; |
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.
Perhaps add a maximum length on here too in case the first line is something crazy long?
return firstLine.length > 256 ? firstLine.substr(0, 255) + "…" : firstLine;
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.
Look good!
Hows it going here? |
Intended to fix #124 but not yet ready.