diff --git a/src/scripts/notify.sh b/src/scripts/notify.sh index cb75026..9318237 100644 --- a/src/scripts/notify.sh +++ b/src/scripts/notify.sh @@ -89,6 +89,7 @@ getIssueKeys() { BRANCH_KEYS="$(parseKeys "$CIRCLE_BRANCH")" local COMMIT_KEYS COMMIT_KEYS="$(parseKeys "$COMMIT_MESSAGE")" + BODY_KEYS="$(parseKeys "$COMMIT_BODY")" log "GETTING TAG KEYS" local TAG_KEYS TAG_KEYS="$(getTagKeys)" @@ -96,6 +97,7 @@ getIssueKeys() { # Check if the parsed keys are not empty before adding to the array. [[ -n "$BRANCH_KEYS" ]] && KEY_ARRAY+=("$BRANCH_KEYS") [[ -n "$COMMIT_KEYS" ]] && KEY_ARRAY+=("$COMMIT_KEYS") + [[ -n "$BODY_KEYS" ]] && KEY_ARRAY+=("$BODY_KEYS") [[ -n "$TAG_KEYS" ]] && KEY_ARRAY+=("$TAG_KEYS") # Remove duplicates @@ -107,6 +109,7 @@ getIssueKeys() { local message="No issue keys found in branch, commit message, or tag" local dbgmessage=" Branch: $CIRCLE_BRANCH\n" dbgmessage+=" Commit: $COMMIT_MESSAGE\n" + dbgmessage+=" Body: $COMMIT_BODY\n" dbgmessage+=" Tag: $(git tag --points-at HEAD -l --format='%(tag) %(subject)' )\n" echo "$message" echo -e "$dbgmessage" @@ -237,6 +240,7 @@ TIME_EPOCH=$(date +%s) TIME_STAMP=$(date -u +"%Y-%m-%dT%H:%M:%S.000Z") # JIRA_DEBUG_TEST_COMMIT is only used in testing COMMIT_MESSAGE=$(git show -s --format='%s' "${JIRA_DEBUG_TEST_COMMIT:-$CIRCLE_SHA1}") +COMMIT_BODY=$(git show -s --format='%b' "${JIRA_DEBUG_TEST_COMMIT:-$CIRCLE_SHA1}") JIRA_BUILD_STATUS=$(cat /tmp/circleci_jira_status) PROJECT_VCS="" PROJECT_SLUG="" @@ -264,6 +268,7 @@ export JIRA_VAL_PIPELINE_NUMBER export TIME_EPOCH export TIME_STAMP export COMMIT_MESSAGE +export COMMIT_BODY export JIRA_BUILD_STATUS export PROJECT_SLUG export JIRA_PIPELINE_URL