Commit 6f8f427 1 parent 04e29e0 commit 6f8f427 Copy full SHA for 6f8f427
File tree 1 file changed +11
-10
lines changed
1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -63,23 +63,24 @@ async function main() {
63
63
workflow_id : workflow ,
64
64
branch : branch ,
65
65
event : event ,
66
- status : workflowConclusion ,
67
66
}
68
67
) ) {
69
- const run = runs . data . find ( r => {
70
- if ( commit ) {
71
- return r . head_sha == commit
68
+ for ( const run of runs . data ) {
69
+ if ( commit && run . head_sha != commit ) {
70
+ continue
72
71
}
73
- if ( runNumber ) {
74
- return r . run_number == runNumber
72
+ if ( runNumber && run . run_number != runNumber ) {
73
+ continue
74
+ }
75
+ if ( workflowConclusion && ( workflowConclusion != run . conclusion && workflowConclusion != run . status ) ) {
76
+ continue
75
77
}
76
- return true
77
- } )
78
-
79
- if ( run ) {
80
78
runID = run . id
81
79
break
82
80
}
81
+ if ( runID ) {
82
+ break
83
+ }
83
84
}
84
85
}
85
86
You can’t perform that action at this time.
0 commit comments