Skip to content

Commit

Permalink
use commit as text, and leave the attachmen for color
Browse files Browse the repository at this point in the history
  • Loading branch information
franklychilled committed Feb 27, 2024
1 parent c14d94a commit 60e9e1d
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions src/slackNotification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ export const getSlackMessageAttachments = (results: JunitResult): unknown => {
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": getCommitText(results)
},
"accessory": {
"type": "button",
"text": {
Expand All @@ -102,19 +98,7 @@ export const getSlackMessageAttachments = (results: JunitResult): unknown => {
};

export const getSlackTextMessage = (results: JunitResult): string => {
const details = results.suite.map((result) => {
return getTextSummaryLine(result);
});

const extra = results.extra_message?.length > 0 ? [
results.extra_message
] : [];

return [
getCommitText(results),
...details,
...extra
].join("\n");
return getCommitText(results);
};

export const sendResultToSlack = async (slackToken: string | undefined, channel: string, junitResult: JunitResult): Promise<unknown> => {
Expand Down

0 comments on commit 60e9e1d

Please sign in to comment.