Skip to content

Commit 103d8d8

Browse files
committed
improve slack messages format
1 parent c880a83 commit 103d8d8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

live-demo/deploy/buildSlackNotify.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ COMMIT_SHORT_SHA=$(echo $CI_COMMIT_SHA | cut -c1-8)
55

66

77
if [ "$CI_STEP_STATUS" = "success" ]; then
8-
MESSAGE="Did a build without issues on \`$CI_REPO_NAME/$CI_COMMIT_BRANCH\`. (<$CI_COMMIT_URL|$COMMIT_SHORT_SHA>)"
8+
MESSAGE="Did a build without issues on \`$CI_REPO_NAME/$CI_COMMIT_BRANCH\`. Commit: _${CI_COMMIT_MESSAGE}_ (<$CI_COMMIT_URL|$COMMIT_SHORT_SHA>)"
9+
910

1011
curl -s -X POST -H "Content-Type: application/json" -d '{
1112
"username": "'"$CI_COMMIT_AUTHOR"'",
@@ -23,7 +24,7 @@ fi
2324
export BUILD_LOG=$(cat ../../adminforth/build.log)
2425

2526

26-
MESSAGE="Broke \`$CI_REPO_NAME/$CI_COMMIT_BRANCH\` with commit (<$CI_COMMIT_URL|$COMMIT_SHORT_SHA>)."
27+
MESSAGE="Broke \`$CI_REPO_NAME/$CI_COMMIT_BRANCH\` with commit _${CI_COMMIT_MESSAGE}_ (<$CI_COMMIT_URL|$COMMIT_SHORT_SHA>)"
2728
CODE_BLOCK="\`\`\`$BUILD_LOG\n\`\`\`"
2829

2930
echo "Sending slack message to developers $MESSAGE"

0 commit comments

Comments
 (0)