From 8f4f68fb6e055e17b762c525def26129d3460650 Mon Sep 17 00:00:00 2001 From: zeme Date: Tue, 8 Oct 2024 11:26:29 +0200 Subject: [PATCH] wip --- .github/workflows/slack-message-broker.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/slack-message-broker.yml b/.github/workflows/slack-message-broker.yml index d029e3884fd..75a95af851b 100644 --- a/.github/workflows/slack-message-broker.yml +++ b/.github/workflows/slack-message-broker.yml @@ -15,10 +15,9 @@ jobs: id: prepare-slack-message with: script: | - console.log(${{ toJson(github.event) }}); + const core = require('@actions/core'); - let message; - let shouldSendMessage; + console.log(${{ toJson(github.event) }}); const sender = "${{ github.event.sender.login }}"; const name = "${{ github.event.check_run.name }}"; @@ -26,10 +25,8 @@ jobs: const conclusion = "${{ github.event.check_run.conclusion }}"; const url = "${{ github.event.check_run.html_url }}"; - assert(status == "completed", `Expected status to be "completed", but got "${status}"`); - - const message = `${name} *failed* ❌ <${url}|View Logs> @${sender}`; - const shouldSendMessage = conclusion == "failure"; + let message = `${name} \`${conclusion}\` ❌ <${url}|View Logs> @${sender}`; + let shouldSendMessage = conclusion == "failure"; console.log(`message: ${message}`); console.log(`shouldSendMessage: ${shouldSendMessage}`);