Skip to content

Commit

Permalink
Prepare 2.1.0 release (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
iansu committed Oct 31, 2022
1 parent d1edf6c commit bd4fa6e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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 <ian@iansutherland.ca>",
"license": "MIT",
"repository": {
Expand Down
9 changes: 6 additions & 3 deletions src/format-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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`;
}
}

Expand Down

0 comments on commit bd4fa6e

Please sign in to comment.