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: [
...
...
@@ -52,7 +53,7 @@ jobs:
"type": "header",
"text": {
"type": "plain_text",
"text": `:alert: CI is failing on ${branch} :alert:`,
"text": `:alert: CI is failing on ${BRANCH} :alert:`,
"emoji": true,
}
},
...
...
@@ -64,7 +65,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": `Commit <https://github.com/metabase/metabase/commit/${breaking_commit}|${breaking_commit.slice(0,7)}> by ${author} has failing tests on the \`${branch}\` branch . :sad-panda:\nPlease fix ASAP. Emoji this message when it's fixed.`
"text": `Commit <https://github.com/metabase/metabase/commit/${BREAKING_COMMIT}|${BREAKING_COMMIT.slice(0,7)}> by ${AUTHOR} has failing <${FAILED_RUN_URL}|${FAILED_RUN_NAME}> tests on the \`${BRANCH}\` branch . :sad-panda:\nPlease fix ASAP. \n\nEmoji this message when it's fixed.`