diff --git a/CHANGELOG.md b/CHANGELOG.md index fac67509..dd309c6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Apollo Schema Check Action Changelog +## 2.1.0 (October 31, 2022) + +- Include a list of errors in the PR comment (@comp615) +- Fix: only count errors and warnings in change summary (@comp615) + ## 2.0.2 (September 15, 2022) - Update `from` parameter format. It seems Apollo no longer wants `sec` included with offsets. diff --git a/package-lock.json b/package-lock.json index c65c436c..09ea884d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "apollo-schema-check-action", - "version": "2.0.1", + "version": "2.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "apollo-schema-check-action", - "version": "2.0.1", + "version": "2.1.0", "license": "MIT", "dependencies": { "@actions/core": "^1.6.0", diff --git a/package.json b/package.json index 8dfe71da..eece4ae9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "apollo-schema-check-action", "description": "A GitHub Action to run a schema check with Apollo Studio and post the results as a comment on a Pull Request", - "version": "2.0.2", + "version": "2.1.0", "author": "Ian Sutherland ", "license": "MIT", "repository": { diff --git a/src/format-message.ts b/src/format-message.ts index 2fa5bda6..0d5d3e77 100644 --- a/src/format-message.ts +++ b/src/format-message.ts @@ -49,7 +49,10 @@ const getSummary = ( checkSchemaResult?.diffToPrevious.severity === 'WARNING' || checkSchemaResult?.diffToPrevious.severity === 'FAILURE' ) { - const issueCount = checkSchemaResult?.diffToPrevious.changes.filter((change) => change.severity === 'FAILURE' || change.severity === 'WARNING').length; + 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'); @@ -129,13 +132,13 @@ const formatMessage = ( message += '```\n'; } - + if (checkSchemaResult?.diffToPrevious.severity === 'FAILURE') { message += '#### Schema Change Errors\n\n```\n'; for (const change of checkSchemaResult?.diffToPrevious.changes) { if (change.severity === 'FAILURE') { - message += `${error.description}\n`; + message += `${change.description}\n`; } }