Skip to content

Commit

Permalink
chore: branch is available when even is workflow_dispatch (#137)
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Büttner <[email protected]>
  • Loading branch information
Tirke and tuffz authored May 22, 2024
1 parent 40f1175 commit 0752207
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 0752207

Please sign in to comment.