File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -64,12 +64,15 @@ async function run() {
6464
6565 // Creates the delete runs array, and adds the runs that don't have a workflow associated with it
6666 let del_runs = new Array ( ) ;
67- del_runs = all_runs . filter (
68- ( { workflow_id } ) => {
69- return workflow_ids . some ( w => w === workflow_id ) ;
67+ for ( const run of all_runs ) {
68+ if ( ! workflow_ids . includes ( run . workflow_id ) ) {
69+ del_runs . push ( run ) ;
70+ core . debug ( ` Added to del list '${ run . name } ' workflow run ${ run . id } ` ) ;
7071 }
71- ) ;
72+ }
7273
74+ console . log ( `💬 found total of ${ del_runs . length } workflow run(s)` ) ;
75+ // is attempting to delete the existing workflow. Means the filtering logic is wrong
7376 for ( const del of del_runs ) {
7477 core . debug ( `Deleting '${ del . name } ' workflow run ${ del . id } ` ) ;
7578 // Execute the API "Delete a workflow run", see 'https://octokit.github.io/rest.js/v18#actions-delete-workflow-run'
You can’t perform that action at this time.
0 commit comments