Skip to content

Commit

Permalink
fix: ensure customEvent is not empty
Browse files Browse the repository at this point in the history
Github actions default value is `''` 

it leads to `Error: Request failed with status code 400`  as summary is empty
  • Loading branch information
tanguyantoine authored Jun 7, 2022
1 parent 25417ab commit 774e9ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit 774e9ea

Please sign in to comment.