From 774e9ea9dbf0b7c5386c6cb32397ae2e9eb9580a Mon Sep 17 00:00:00 2001 From: Tanguy Antoine Date: Tue, 7 Jun 2022 08:50:51 +0200 Subject: [PATCH] fix: ensure customEvent is not empty Github actions default value is `''` it leads to `Error: Request failed with status code 400` as summary is empty --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index cb7e3a7..1ec1928 100644 --- a/index.js +++ b/index.js @@ -148,7 +148,7 @@ try { const customEvent = core.getInput('custom-event'); const data = github.context.payload; - if (typeof customEvent === 'string') { + if (typeof customEvent === 'string' && customEvent !== '') { // if custom event is described, prefer emitting custom event handleCustomEvent(customEvent, integrationKey); } else if (github.context.eventName === 'push') {