From 620665b096e13b1f6a2a17dabfe7abe2ca5efb1a Mon Sep 17 00:00:00 2001 From: Adam Rensel Date: Mon, 10 May 2021 19:42:10 -0400 Subject: [PATCH] throw error when checks fail --- .github/workflows/src/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/src/index.js b/.github/workflows/src/index.js index aa315ff3..acdce629 100644 --- a/.github/workflows/src/index.js +++ b/.github/workflows/src/index.js @@ -161,6 +161,7 @@ ${feedback.join('\n')} } console.log(feedBackMessage) + try { await octokit.createReview(` **Hi ${ actionEvent.pullAuthor },** @@ -171,5 +172,9 @@ ${ feedBackMessage } } catch(err) { console.log(err) } + + if(feedback.length) { + throw new Error(feedback.join('\n')) + } } })() -- knotmirror 0.0.1