Skip to content

Commit

Permalink
Merge pull request #3 from Rebilly/jh/bump-dependencies
Browse files Browse the repository at this point in the history
Bump trim version for security fix
  • Loading branch information
Weetbix authored Jul 9, 2021
2 parents d05f09c + abc4734 commit 9a08644
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 19 deletions.
13 changes: 10 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30780,15 +30780,22 @@ var main = /*#__PURE__*/function () {
newReadability: newReadability,
oldReadability: oldReadability,
fileStatuses: fileStatuses
});
}); // Only post a comment if there are results from markdown files
// changed in this PR

if (!report.fileResults.length) {
_context.next = 27;
break;
}

repository = context.payload.repository.full_name;
commit = context.payload.pull_request.head.sha;
body = reportToComment({
report: report,
repository: repository,
commit: commit
});
_context.next = 26;
_context.next = 27;
return upsertComment({
client: client,
context: context,
Expand All @@ -30797,7 +30804,7 @@ var main = /*#__PURE__*/function () {
hiddenHeader: "<!-- ".concat(glob, "-code-coverage-assistant -->")
});

case 26:
case 27:
case "end":
return _context.stop();
}
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,8 @@
"tabWidth": 4,
"singleQuote": true,
"bracketSpacing": false
},
"resolutions": {
"text-readability/syllable/trim": "^0.0.3"
}
}
29 changes: 17 additions & 12 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,23 @@ const main = async () => {
fileStatuses,
});

const repository = context.payload.repository.full_name;
const commit = context.payload.pull_request.head.sha;

const body = reportToComment({report, repository, commit});

await upsertComment({
client,
context,
prNumber: context.payload.pull_request.number,
body,
hiddenHeader: `<!-- ${glob}-code-coverage-assistant -->`,
});
// Only post a comment if there are results from markdown files
// changed in this PR
if(report.fileResults.length)
{
const repository = context.payload.repository.full_name;
const commit = context.payload.pull_request.head.sha;

const body = reportToComment({report, repository, commit});

await upsertComment({
client,
context,
prNumber: context.payload.pull_request.number,
body,
hiddenHeader: `<!-- ${glob}-code-coverage-assistant -->`,
});
}
};

main().catch((err) => {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4487,10 +4487,10 @@ tr46@^2.1.0:
dependencies:
punycode "^2.1.1"

[email protected]:
version "0.0.1"
resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd"
integrity sha1-WFhUf2spB1fulczMZm+1AITEYN0=
[email protected], trim@^0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.3.tgz#05243a47a3a4113e6b49367880a9cca59697a20b"
integrity sha512-h82ywcYhHK7veeelXrCScdH7HkWfbIT1D/CgYO+nmDarz3SGNssVBMws6jU16Ga60AJCRAvPV6w6RLuNerQqjg==

trough@^1.0.0:
version "1.0.5"
Expand Down

0 comments on commit 9a08644

Please sign in to comment.