Skip to content

Commit e41ac56

Browse files
authored
github: annotation's message was empty(#88)
* github: annotation's message was empty
1 parent 31a89f7 commit e41ac56

File tree

9 files changed

+39
-19
lines changed

9 files changed

+39
-19
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ yarn-error.log
55
**/*/dist/
66
**/*/build/
77
**/*/yarn-error.log
8+
.env
9+
private-key.pem

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
### vNEXT
44

5+
- **github**: annotation's `message` was empty [PR #87](https://github.com/kamilkisiela/graphql-inspector/pull/87)
6+
57
### v0.13.1
68

79
- **cli**: bump `apollo-server@2.4.0` [PR #86](https://github.com/kamilkisiela/graphql-inspector/pull/86)

app.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// For quick tests
2+
const appFn = require('@graphql-inspector/github').default;
3+
4+
module.exports = appFn;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"husky": "1.2.0",
4343
"immer": "1.10.0",
4444
"lerna": "3.6.0",
45-
"netlify-lambda": "1.1.1",
45+
"netlify-lambda": "1.4.2",
4646
"shelljs": "0.8.3"
4747
},
4848
"workspaces": [

packages/github-actions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"dependencies": {
3535
"@graphql-inspector/github": "0.0.0-PLACEHOLDER",
3636
"graphql": "14.0.2",
37-
"probot": "7.4.0",
37+
"probot": "7.5.0",
3838
"uuid": "3.3.2"
3939
},
4040
"devDependencies": {

packages/github/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"scripts": {
2626
"start": "probot run ./dist/index.js",
27-
"dev": "yarn build && yarn now-start",
27+
"dev": "yarn build && yarn start",
2828
"build": "tsc",
2929
"clean": "rm -rf dist/",
3030
"deploy": "now --docker",
@@ -42,7 +42,7 @@
4242
"@types/express": "4.16.0",
4343
"@types/graphql": "14.0.3",
4444
"graphql": "14.0.2",
45-
"probot": "7.4.0",
45+
"probot": "7.5.0",
4646
"smee-client": "1.0.2",
4747
"typescript": "3.2.2"
4848
}

packages/github/src/diff.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function annotate({
8282
title: change.message,
8383
annotation_level: levelMap[level],
8484
path,
85-
message: change.criticality.reason || '',
85+
message: change.criticality.reason || change.message,
8686
start_line: loc.line,
8787
end_line: loc.line,
8888
};

packages/github/src/probot.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ export async function handleAction({
180180
summary: issueInfo,
181181
};
182182

183+
context.log.info(`Sending annotations (${annotations.length})`);
184+
183185
await check.annotations({
184186
url,
185187
context,
@@ -188,9 +190,13 @@ export async function handleAction({
188190
annotations,
189191
});
190192

193+
context.log.info(`Finishing check (${conclusion})`);
194+
191195
await check.complete({
192196
url,
193197
context,
194198
conclusion,
195199
});
200+
201+
context.log.info(`Completed`);
196202
}

yarn.lock

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5487,10 +5487,10 @@ dotenv@6.0.0:
54875487
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-6.0.0.tgz#24e37c041741c5f4b25324958ebbc34bca965935"
54885488
integrity sha512-FlWbnhgjtwD+uNLUGHbMykMOYQaTivdHEmYwAKFjn6GKe/CqY0fNae93ZHTd20snh9ZLr8mTzIL9m0APQ1pjQg==
54895489

5490-
dotenv@~6.1.0:
5491-
version "6.1.0"
5492-
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-6.1.0.tgz#9853b6ca98292acb7dec67a95018fa40bccff42c"
5493-
integrity sha512-/veDn2ztgRlB7gKmE3i9f6CmDIyXAy6d5nBq+whO9SLX+Zs1sXEgFLPi+aSuWqUuusMfbi84fT8j34fs1HaYUw==
5490+
dotenv@~6.2.0:
5491+
version "6.2.0"
5492+
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-6.2.0.tgz#941c0410535d942c8becf28d3f357dbd9d476064"
5493+
integrity sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==
54945494

54955495
dtrace-provider@~0.8:
54965496
version "0.8.7"
@@ -9301,6 +9301,11 @@ jws@^3.1.5:
93019301
jwa "^1.2.0"
93029302
safe-buffer "^5.0.1"
93039303

9304+
jwt-decode@^2.2.0:
9305+
version "2.2.0"
9306+
resolved "https://registry.yarnpkg.com/jwt-decode/-/jwt-decode-2.2.0.tgz#7d86bd56679f58ce6a84704a657dd392bba81a79"
9307+
integrity sha1-fYa9VmefWM5qhHBKZX3TkruoGnk=
9308+
93049309
killable@^1.0.0:
93059310
version "1.0.1"
93069311
resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892"
@@ -10445,10 +10450,10 @@ neo-async@^2.5.0:
1044510450
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.0.tgz#b9d15e4d71c6762908654b5183ed38b753340835"
1044610451
integrity sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==
1044710452

10448-
netlify-lambda@1.1.1:
10449-
version "1.1.1"
10450-
resolved "https://registry.yarnpkg.com/netlify-lambda/-/netlify-lambda-1.1.1.tgz#6f824502f1ed7c3aa2267edea673060b3e3639c9"
10451-
integrity sha512-/wfjyDLBk4Qfatl7UYJfsV5oArJEbGwLf/IO6V/ii0FvtMDfVbILZSICeuZqLiQgHHYGmTe1wrqZPGBiBdZ28A==
10453+
netlify-lambda@1.4.2:
10454+
version "1.4.2"
10455+
resolved "https://registry.yarnpkg.com/netlify-lambda/-/netlify-lambda-1.4.2.tgz#cd4972c942e449c64b30d58ca7d7725a58547fb7"
10456+
integrity sha512-Iy9SoS0sAyAHP8Bg93kLO+/RJkSf8Q0NqzBchMNAa6xKbDmcTxqg6crMk3mRNkCewgWhvN5uGSWmaA7FZHN1sQ==
1045210457
dependencies:
1045310458
"@babel/core" "^7.0.0"
1045410459
"@babel/plugin-proposal-class-properties" "^7.0.0"
@@ -10460,6 +10465,7 @@ netlify-lambda@1.1.1:
1046010465
commander "^2.17.1"
1046110466
express "^4.16.3"
1046210467
express-logging "^1.1.1"
10468+
jwt-decode "^2.2.0"
1046310469
toml "^2.3.3"
1046410470
webpack "^4.17.1"
1046510471
webpack-merge "^4.1.4"
@@ -12098,10 +12104,10 @@ private@^0.1.6, private@^0.1.8:
1209812104
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
1209912105
integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==
1210012106

12101-
probot@7.4.0:
12102-
version "7.4.0"
12103-
resolved "https://registry.yarnpkg.com/probot/-/probot-7.4.0.tgz#96a70148e8a114bcba75fd1a261155a559916cc5"
12104-
integrity sha512-xyvra7baRi8o/KortENZHFae8TZCBHvrKKTVvL1l5DhLBb1mfey+6AM2bxEai5ajDkrKnNiA69aDtb32WO5bRQ==
12107+
probot@7.5.0:
12108+
version "7.5.0"
12109+
resolved "https://registry.yarnpkg.com/probot/-/probot-7.5.0.tgz#17f4441210c95b822a53dc9748fb17261a1aacdf"
12110+
integrity sha512-i7YCcSWf0tT2FPlIqgtJC2ZV/jelB2y3tf+TRWrvt4kJAgYEhgrofyM2pl/f+lg7xdULP/9FNAayn0sjv/u7kg==
1210512111
dependencies:
1210612112
"@octokit/rest" "^15.18.0"
1210712113
"@octokit/webhooks" "^5.0.2"
@@ -12112,7 +12118,7 @@ probot@7.4.0:
1211212118
bunyan-sentry-stream "^1.1.0"
1211312119
cache-manager "^2.4.0"
1211412120
commander "^2.19.0"
12115-
dotenv "~6.1.0"
12121+
dotenv "~6.2.0"
1211612122
express "^4.16.2"
1211712123
express-async-errors "^3.0.0"
1211812124
hbs "^4.0.1"
@@ -12125,7 +12131,7 @@ probot@7.4.0:
1212512131
raven "^2.4.2"
1212612132
resolve "^1.4.0"
1212712133
semver "^5.5.0"
12128-
supports-color "^5.5.0"
12134+
supports-color "^6.0.0"
1212912135
update-dotenv "^1.1.0"
1213012136
uuid "^3.2.1"
1213112137

0 commit comments

Comments
 (0)