Skip to content

Commit 0752207

Browse files
Tirketuffz
andauthored
chore: branch is available when even is workflow_dispatch (#137)
Co-authored-by: Eric Büttner <[email protected]>
1 parent 40f1175 commit 0752207

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dist/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -37976,8 +37976,8 @@ function findSuccessfulCommit(workflow_id, run_id, owner, repo, branch, lastSucc
3797637976
.request(`GET /repos/${owner}/${repo}/actions/workflows/${workflow_id}/runs`, {
3797737977
owner,
3797837978
repo,
37979-
// on non-push workflow runs we do not have branch property
37980-
branch: lastSuccessfulEvent !== "push" ? undefined : branch,
37979+
// on some workflow runs we do not have branch property
37980+
branch: lastSuccessfulEvent === "push" || lastSuccessfulEvent === "workflow_dispatch" ? branch : undefined,
3798137981
workflow_id,
3798237982
event: lastSuccessfulEvent,
3798337983
status: "success",

find-successful-workflow.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ async function findSuccessfulCommit(
172172
{
173173
owner,
174174
repo,
175-
// on non-push workflow runs we do not have branch property
176-
branch: lastSuccessfulEvent !== "push" ? undefined : branch,
175+
// on some workflow runs we do not have branch property
176+
branch: lastSuccessfulEvent === "push" || lastSuccessfulEvent === "workflow_dispatch" ? branch : undefined,
177177
workflow_id,
178178
event: lastSuccessfulEvent,
179179
status: "success",

0 commit comments

Comments
 (0)