File tree 1 file changed +3
-10
lines changed
packages/utils/src/lib/reports
1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -268,22 +268,15 @@ function changesToDiffOutcomes(changes: Change[]): DiffOutcome[] {
268
268
}
269
269
270
270
function mergeDiffOutcomes ( outcomes : DiffOutcome [ ] ) : DiffOutcome {
271
- if ( outcomes . length === 0 ) {
271
+ if ( outcomes . every ( outcome => outcome === 'unchanged' ) ) {
272
272
return 'unchanged' ;
273
273
}
274
- if (
275
- outcomes . every ( outcome => outcome === 'positive' || outcome === 'unchanged' )
276
- ) {
274
+ if ( outcomes . includes ( 'positive' ) && ! outcomes . includes ( 'negative' ) ) {
277
275
return 'positive' ;
278
276
}
279
- if (
280
- outcomes . every ( outcome => outcome === 'negative' || outcome === 'unchanged' )
281
- ) {
277
+ if ( outcomes . includes ( 'negative' ) && ! outcomes . includes ( 'positive' ) ) {
282
278
return 'negative' ;
283
279
}
284
- if ( outcomes . every ( outcome => outcome === 'unchanged' ) ) {
285
- return 'unchanged' ;
286
- }
287
280
return 'mixed' ;
288
281
}
289
282
You can’t perform that action at this time.
0 commit comments