Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
zeme-wana committed Oct 8, 2024
1 parent 4326ca2 commit 8f4f68f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/slack-message-broker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,18 @@ 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 }}";
const status = "${{ github.event.check_run.status }}";
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}`);
Expand Down

0 comments on commit 8f4f68f

Please sign in to comment.