-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
Format danger percents better #12256
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.
Lg, two nits
return `+${change}%`; | ||
if (!isFinite(change)) { | ||
// When a new package is created | ||
return 'n/a'; |
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.
Maybe (new)
? I don't feel strongly
dangerfile.js
Outdated
} else { | ||
return `${change}%`; | ||
if (includeEmoji) { |
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.
"No changes" becomes "+0.0%". Do you think maybe we could special case this and show (none)
or (same)
? Danger will skip over them but they still show up in local output. Or at least maybe lose the +
if it's exact zero.
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.
ahh good catch, I noticed this in the original code and forgot to match it.
Test Plan: yolo? yarn danger pr didn't give me any useful output. :\
Test Plan: yolo? yarn danger pr didn't give me any useful output. :\
Test Plan: yolo? yarn danger pr didn't give me any useful output. :\
Test Plan: yolo? yarn danger pr didn't give me any useful output. :\