Skip to content

Commit

Permalink
extra formatting and footer
Browse files Browse the repository at this point in the history
  • Loading branch information
GrantBirki committed May 10, 2022
1 parent 10af7d7 commit 333ba95
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
10 changes: 6 additions & 4 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions src/functions/post-deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ export async function postDeploy(

// Set the mode and deploy type based on the deployment mode
if (noop === 'true') {
mode = 'noop 🧪'
mode = '`noop` 🧪'
deployTypeString = ' noop '
} else {
mode = 'branch 🚀'
mode = '`branch` 🚀'
}

// Dynamically set the message text depending if the deployment succeeded or failed
Expand All @@ -79,6 +79,8 @@ export async function postDeploy(
deployStatus = `\`${status}\` ⚠️`
}

const footer = `Actor: **${context.actor}**, Action: \`${context.eventName}\`, Workflow: \`${context.workflow}\``

// Conditionally format the message body
var message_fmt
if (customMessage && customMessage.length > 0) {
Expand All @@ -100,7 +102,7 @@ export async function postDeploy(
${message}
> Actor: ${context.actor}, Action: \`${context.eventName}\`, Workflow: \`${context.workflow}\`
> ${footer}
`)
} else {
message_fmt = dedent(`
Expand All @@ -112,7 +114,7 @@ export async function postDeploy(
${message}
> Actor: ${context.actor}, Action: \`${context.eventName}\`, Workflow: \`${context.workflow}\`
> ${footer}
`)
}

Expand Down

0 comments on commit 333ba95

Please sign in to comment.