Skip to content

Commit

Permalink
Only count failed changes when reporting summary (#25)
Browse files Browse the repository at this point in the history
Co-authored-by: Ian Sutherland <ian@iansutherland.ca>
  • Loading branch information
comp615 and iansu committed Oct 31, 2022
1 parent aa2eda0 commit d1edf6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/format-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ const getSummary = (
checkSchemaResult?.diffToPrevious.severity === 'WARNING' ||
checkSchemaResult?.diffToPrevious.severity === 'FAILURE'
) {
summary += `❌ Found **${checkSchemaResult?.diffToPrevious.changes.length} breaking changes**\n\n`;
const issueCount = checkSchemaResult?.diffToPrevious.changes.filter((change) => change.severity === 'FAILURE' || change.severity === 'WARNING').length;
summary += `❌ Found **${issueCount} breaking changes**\n\n`;

setFailed('Breaking changes found');
}
Expand Down

0 comments on commit d1edf6c

Please sign in to comment.