Skip to content
Snippets Groups Projects
Unverified Commit e6374476 authored by Ryan Laurie's avatar Ryan Laurie Committed by GitHub
Browse files

[CI] Fix syntax error in slack notifications script (#30660)

parent 2b6b2baf
No related branches found
No related tags found
No related merge requests found
......@@ -30,10 +30,6 @@ jobs:
const MAX_ATTEMPTS = 2;
const ATTEMPT = ${{ github.event.workflow_run.run_attempt }};
const author = `@${context.actor}`;
const breaking_commit = context.sha;
const branch = context.ref;
if (ATTEMPT <= MAX_ATTEMPTS) {
github.rest.actions.reRunWorkflowFailedJobs({
owner: context.repo.owner,
......@@ -42,9 +38,13 @@ jobs:
});
} else {
// notify slack of repeated failure
const WebClient = require('@slack/web-api');
const { WebClient } = require('@slack/web-api');
const slack = new WebClient('${{ secrets.SLACK_BOT_TOKEN }}');
const author = `@${context.actor}`;
const breaking_commit = context.sha;
const branch = context.ref;
await slack.chat.postMessage({
channel: 'engineering-ci',
blocks: [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment