mypy_primer: don't fail silently on comment failure (#5002)

Co-authored-by: hauntsaninja <>
This commit is contained in:
Shantanu
2021-02-02 23:35:38 -08:00
committed by GitHub
parent ece1a3e525
commit 1959669aa4

View File

@@ -89,15 +89,11 @@ jobs:
console.log("Diff from mypy_primer:")
console.log(data)
try {
if (data.trim()) {
await github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Diff from [mypy_primer](https://github.com/hauntsaninja/mypy_primer), showing the effect of this PR on open source code:\n```diff\n' + data + '```'
})
}
} catch (error) {
console.log(error)
if (data.trim()) {
await github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Diff from [mypy_primer](https://github.com/hauntsaninja/mypy_primer), showing the effect of this PR on open source code:\n```diff\n' + data + '```'
})
}