Skip to content

Commit

Permalink
fix: get workflows only for commit
Browse files Browse the repository at this point in the history
In f6b0bac the check on the commit value provided was moved to the body of the
function. Instead directly provide it as parameter of the request as it was
before assuming that this might affect the number of requests sent.
  • Loading branch information
romangg committed Feb 16, 2024
1 parent f6b0bac commit b248403
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,10 @@ async function main() {
...(workflow ? { workflow_id: workflow } : {}),
...(branch ? { branch } : {}),
...(event ? { event } : {}),
...(commit ? { head_sha: commit } : {}),
}
)) {
for (const run of runs.data) {
if (commit && run.head_sha != commit) {
continue
}
if (runNumber && run.run_number != runNumber) {
continue
}
Expand Down

0 comments on commit b248403

Please sign in to comment.