diff --git a/dist/index.js b/dist/index.js index 974c09b..55d2d3b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -37976,8 +37976,8 @@ function findSuccessfulCommit(workflow_id, run_id, owner, repo, branch, lastSucc .request(`GET /repos/${owner}/${repo}/actions/workflows/${workflow_id}/runs`, { owner, repo, - // on non-push workflow runs we do not have branch property - branch: lastSuccessfulEvent !== "push" ? undefined : branch, + // on some workflow runs we do not have branch property + branch: lastSuccessfulEvent === "push" || lastSuccessfulEvent === "workflow_dispatch" ? branch : undefined, workflow_id, event: lastSuccessfulEvent, status: "success", diff --git a/find-successful-workflow.ts b/find-successful-workflow.ts index 788cbcc..a0e1ee1 100644 --- a/find-successful-workflow.ts +++ b/find-successful-workflow.ts @@ -172,8 +172,8 @@ async function findSuccessfulCommit( { owner, repo, - // on non-push workflow runs we do not have branch property - branch: lastSuccessfulEvent !== "push" ? undefined : branch, + // on some workflow runs we do not have branch property + branch: lastSuccessfulEvent === "push" || lastSuccessfulEvent === "workflow_dispatch" ? branch : undefined, workflow_id, event: lastSuccessfulEvent, status: "success",