From 3fd5a3fdc9e58e08f87bcc2f9f24983b82fc17ed Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 22 Apr 2022 23:37:13 +0300 Subject: [PATCH 1/2] test sending random slack notification --- src/develop_actions.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/develop_actions.js b/src/develop_actions.js index 8a42f36..42ebb8c 100644 --- a/src/develop_actions.js +++ b/src/develop_actions.js @@ -25,7 +25,6 @@ const run = async () => { head: branch_name, } ); - console.log("compare commit", compare_commits?.data?.commits); let commits = ""; @@ -37,7 +36,9 @@ const run = async () => { !e?.commit?.message.includes("Skip") ) commits = - i === 0 ? "> " + e.message : commits + "\n\n" + "> " + e.message; + i === 0 + ? "> " + e.commit.message + : commits + "\n\n" + "> " + e.commit.message; }); // fetch pr from branch_name to staging to check if it exists @@ -55,7 +56,7 @@ const run = async () => { type: "header", text: { type: "plain_text", - text: `:sparkles: PR was created from ${branch_name} to satging`, + text: `:sparkles: PR was created from ${branch_name} to staging`, emoji: true, }, }, @@ -63,7 +64,7 @@ const run = async () => { type: "context", elements: [ { - text: `commits`, + text: commits, type: "mrkdwn", }, ], From 07241952e0fdf365502e267b1f04887d51bbab6f Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 22 Apr 2022 23:38:00 +0300 Subject: [PATCH 2/2] test sending random slack notification --- src/develop_actions.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/develop_actions.js b/src/develop_actions.js index 42ebb8c..b41fe7a 100644 --- a/src/develop_actions.js +++ b/src/develop_actions.js @@ -52,26 +52,24 @@ const run = async () => { const options = { blocks: [ - { - type: "header", - text: { - type: "plain_text", - text: `:sparkles: PR was created from ${branch_name} to staging`, - emoji: true, - }, - }, + // { + // type: "header", + // text: { + // type: "plain_text", + // text: `:sparkles: PR was created from ${branch_name} to staging`, + // emoji: true, + // }, + // }, { type: "context", elements: [ { - text: commits, type: "mrkdwn", + text: `:sparkles: PR was created from ${branch_name} to staging`, + emoji: true, }, ], }, - { - type: "divider", - }, ], };