Skip to content

Commit

Permalink
style: Two spaces after emoji for better visual separation
Browse files Browse the repository at this point in the history
  • Loading branch information
franky47 committed Mar 12, 2021
1 parent 1e364e0 commit ca53d0c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
13 changes: 6 additions & 7 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.

13 changes: 6 additions & 7 deletions src/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ export function success(env: GitHubActionsEnv) {
const jobName = core.getInput('jobName')
const runName = jobName ? `${GITHUB_WORKFLOW}/${jobName}` : GITHUB_WORKFLOW
const msg = Message({
text: `✔︎ ${runName} passed on ${GITHUB_REPOSITORY}`
text: `✔︎ ${runName} passed on ${GITHUB_REPOSITORY}`
}).blocks(
Blocks.Section({
text: `*✔︎ ${runName}* passed on <${urls.repo}|*${GITHUB_REPOSITORY}*>`
text: `*✔︎ ${runName}* passed on <${urls.repo}|*${GITHUB_REPOSITORY}*>`
})
)
const dependabot = parseDependabotRef(GITHUB_HEAD_REF)
if (dependabot) {
msg.blocks(
Blocks.Section({
text: `📦 *${dependabot.package}* ${dependabot.version} _(by Dependabot)_`
text: `📦 *${dependabot.package}* ${dependabot.version} _(by Dependabot)_`
})
)
}
Expand All @@ -46,17 +46,17 @@ export function failure(env: GitHubActionsEnv, steps: Steps) {
const runName = jobName ? `${GITHUB_WORKFLOW}/${jobName}` : GITHUB_WORKFLOW

const msg = Message({
text: `🚨 ${runName} failed on ${GITHUB_REPOSITORY}`
text: `🚨 ${runName} failed on ${GITHUB_REPOSITORY}`
}).blocks([
Blocks.Section({
text: `*🚨 ${runName}* failed on <${urls.repo}|*${GITHUB_REPOSITORY}*>`
text: `*🚨 ${runName}* failed on <${urls.repo}|*${GITHUB_REPOSITORY}*>`
})
])
const dependabot = parseDependabotRef(GITHUB_HEAD_REF)
if (dependabot) {
msg.blocks(
Blocks.Section({
text: `📦 *${dependabot.package}* ${dependabot.version} _(by Dependabot)_`
text: `📦 *${dependabot.package}* ${dependabot.version} _(by Dependabot)_`
})
)
}
Expand Down Expand Up @@ -96,7 +96,6 @@ export function getContext(env: GitHubActionsEnv) {
return Blocks.Context().elements([
`From <${urls.commit}|\`${shortSha}\`> on ${getRefContext(env.GITHUB_REF)}`,
`Triggered by *${env.GITHUB_EVENT_NAME}*`
// ...(duration ? [`Took *${duration}*`] : [])
])
}

Expand Down

0 comments on commit ca53d0c

Please sign in to comment.