Skip to content

Commit

Permalink
chore: branch is available when even is workflow_dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
tuffz authored and mandarini committed May 22, 2024
1 parent 76907e7 commit 5f3f584
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions find-successful-workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 5f3f584

Please sign in to comment.