diff --git a/lib/api.js b/lib/api.js index 541e9c61..c9739bc5 100644 --- a/lib/api.js +++ b/lib/api.js @@ -59,17 +59,17 @@ async function executeGitHubAction(context, eventName, eventData) { logger.info("Event name:", eventName); logger.trace("Event data:", eventData); - if (eventName === "push") { + if (["push", "workflow_dispatch"].includes(eventName)) { await handleBranchUpdate(context, eventName, eventData); } else if (eventName === "status") { await handleStatusUpdate(context, eventName, eventData); } else if (eventName === "pull_request") { await handlePullRequestUpdate(context, eventName, eventData); - } else if (eventName === "check_suite" || eventName === "check_run") { + } else if (["check_suite", "check_run"].includes(eventName)) { await handleCheckUpdate(context, eventName, eventData); } else if (eventName === "pull_request_review") { await handlePullRequestReviewUpdate(context, eventName, eventData); - } else if (eventName === "schedule" || eventName === "repository_dispatch") { + } else if (["schedule", "repository_dispatch"].includes(eventName)) { await handleScheduleTriggerOrRepositoryDispatch(context); } else if (eventName === "issue_comment") { await handleIssueComment(context, eventName, eventData);