Skip to content

Commit

Permalink
fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Janpot committed Jun 27, 2020
1 parent 42d3443 commit f300342
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions .github/actions/next-stats-action/src/add-comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,7 @@ module.exports = async function addComment(
if (change !== 0) {
const absChange = Math.abs(change)
const warnIfNegative = isBenchmark && itemKey.match(/req\/sec/)
const warn = warnIfNegative
? change < 0
? ''
: '⚠️ '
: change > 0
? '⚠️ '
: ''
const warn = warnIfNegative && change < 0 ? '⚠️ ' : ''
change = `${warn}${change < 0 ? '-' : '+'}${
useRawValue ? absChange : prettify(absChange, prettyType)
}`
Expand Down

0 comments on commit f300342

Please sign in to comment.