Changeset 53468 for trunk/.github/workflows/slack-notifications.yml
- Timestamp:
- 06/05/2022 07:43:50 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.github/workflows/slack-notifications.yml
r53466 r53468 115 115 // Find the workflow run for the commit that immediately preceded this one. 116 116 for ( let i = 0; i < previous_runs.data.workflow_runs.length; i++ ) { 117 // Protects against false notifications when contributors use similar head_ref names.118 if ( previous_runs.data.workflow_runs[ i ].event !== "push" ) {119 continue;120 }121 122 117 if ( previous_runs.data.workflow_runs[ i ].run_number == workflow_run.data.run_number ) { 123 return previous_runs.data.workflow_runs[ i + 1 ].conclusion; 118 let next_index = i; 119 do { 120 next_index++; 121 122 // Protects against a false notification when contributors use the trunk branch as the pull request head_ref. 123 if ( previous_runs.data.workflow_runs[ next_index ].event !== "push" ) { 124 continue; 125 } 126 127 return previous_runs.data.workflow_runs[ next_index ].conclusion; 128 } while ( next_index < previous_runs.data.workflow_runs.length ); 124 129 } 125 130 }
Note: See TracChangeset
for help on using the changeset viewer.