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

Format danger percents better #12256

Merged
merged 1 commit into from Feb 21, 2018
Merged

Format danger percents better #12256

merged 1 commit into from Feb 21, 2018

Conversation

sophiebits
Copy link
Collaborator

Test Plan: yolo? yarn danger pr didn't give me any useful output. :\

Copy link
Collaborator

@gaearon gaearon left a 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';
Copy link
Collaborator

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) {
Copy link
Collaborator

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.

Copy link
Collaborator Author

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. :\
@sophiebits sophiebits merged commit 2bd1222 into facebook:master Feb 21, 2018
LeonYuAng3NT pushed a commit to LeonYuAng3NT/react that referenced this pull request Mar 22, 2018
Test Plan: yolo? yarn danger pr didn't give me any useful output. :\
rhagigi pushed a commit to rhagigi/react that referenced this pull request Apr 19, 2018
Test Plan: yolo? yarn danger pr didn't give me any useful output. :\
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants