Make WordPress Core

Changeset 56827

Timestamp:
10/11/2023 12:15:18 PM (10 months ago)
Author:
desrosj
Message:

Build/Test Tools: Don’t send Slack notification for workflow retries.

[56780] changed Slack failure notifications to not send a failure notification during the first run of a workflow. Because workflows automatically restart once, a failure during the first run can be ignored.

This adjusts the workflow to also not send a “fixed” notification when the second run of a workflow succeeds after a failure. Because the original failure is no longer reported, these notifications are unnecessary.

See #58867.

File:
1 edited

Legend:

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

    r56780 r56827  
    7676            }
    7777
    78             // When a workflow has been restarted to fix a failure, check the previous run attempt.
    79             if ( workflow_run.data.run_attempt > 1 ) {
     78            // When a workflow has been restarted, check the previous run attempt. Because workflows are automatically
     79            // restarted once and a failure on the first run is not reported, failures on the second run should not be
     80            // considered.
     81            if ( workflow_run.data.run_attempt > 2 ) {
    8082              const previous_run = await github.rest.actions.getWorkflowRunAttempt({
    8183                owner: context.repo.owner,
Note: See TracChangeset for help on using the changeset viewer.