From 1959669aa413793c0669becc85da53743cabefb8 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Tue, 2 Feb 2021 23:35:38 -0800 Subject: [PATCH] mypy_primer: don't fail silently on comment failure (#5002) Co-authored-by: hauntsaninja <> --- .github/workflows/mypy_primer_comment.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/mypy_primer_comment.yml b/.github/workflows/mypy_primer_comment.yml index 15d259d91..965607aed 100644 --- a/.github/workflows/mypy_primer_comment.yml +++ b/.github/workflows/mypy_primer_comment.yml @@ -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 + '```' + }) }