Make WordPress Core


Ignore:
Timestamp:
07/20/2022 05:41:02 PM (3 years ago)
Author:
desrosj
Message:

Build/Test Tools: Correctly detect the first workflow run for a branch or tag.

When trying to determine the outcome of the previous run for a GitHub Action workflow, the current run is included in the list fetched from the GitHub API.

This adjusts the logic checking for the previous run to account for that and fixes notifications for the first workflow runs of a new branch or tag.

See #55652.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/slack-notifications.yml

    r53592 r53735  
    8585
    8686            // This is the first workflow run for this branch or tag.
    87             if ( previous_runs.data.workflow_runs.length == 0 ) {
     87            if ( previous_runs.data.workflow_runs.length < 2 ) {
    8888              return 'none';
    8989            }
Note: See TracChangeset for help on using the changeset viewer.