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

Make broken branch notification less obnoxious (#34452)

parent 8a30a8bf
No related merge requests found
......@@ -27,7 +27,7 @@ jobs:
- name: Trigger a re-run
uses: actions/github-script@v6
with:
script: |
script: | # js
const MAX_ATTEMPTS = 2;
const ATTEMPT = "${{ github.event.workflow_run.run_attempt }}";
const BRANCH = "${{ github.event.workflow_run.head_branch }}";
......@@ -49,58 +49,27 @@ jobs:
await slack.chat.postMessage({
channel: 'engineering-ci',
text: 'Failing tests',
blocks: [
{
"type": "header",
"text": {
"type": "plain_text",
"text": `:alert: CI is failing on ${BRANCH} :alert:`,
"text": `:warning: CI is failing on ${BRANCH}`,
"emoji": true,
}
},
],
attachments: [{
color: '#f85149',
color: BRANCH === 'master' ? '#f85149' : "#ffce33",
blocks: [
{
"type": "section",
"text": {
"type": "mrkdwn",
"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.`
"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 <https://github.com/metabase/metabase/commits/${BRANCH}|\`${BRANCH}\`> branch. :sad-panda:`
}
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Failing Commit",
"emoji": true
},
"url": `https://github.com/metabase/metabase/commit/${BREAKING_COMMIT}`
},
{
"type": "button",
"text": {
"type": "plain_text",
"text": `Recent commits to ${BRANCH}`,
"emoji": true
},
"url": `https://github.com/metabase/metabase/commits/${BRANCH}`
},
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Failed CI Run",
"emoji": true
},
"url": `${FAILED_RUN_URL}`
}
]
}
]
}]
});
......
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