mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@56827 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
6
.github/workflows/slack-notifications.yml
vendored
6
.github/workflows/slack-notifications.yml
vendored
@@ -75,8 +75,10 @@ jobs:
|
||||
return 'first-failure';
|
||||
}
|
||||
|
||||
// When a workflow has been restarted to fix a failure, check the previous run attempt.
|
||||
if ( workflow_run.data.run_attempt > 1 ) {
|
||||
// When a workflow has been restarted, check the previous run attempt. Because workflows are automatically
|
||||
// restarted once and a failure on the first run is not reported, failures on the second run should not be
|
||||
// considered.
|
||||
if ( workflow_run.data.run_attempt > 2 ) {
|
||||
const previous_run = await github.rest.actions.getWorkflowRunAttempt({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
|
||||
Reference in New Issue
Block a user