Skip to content

Commit

Permalink
Fixed email subject in notify.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Jan 31, 2025
1 parent fdf6e3d commit f7f58a5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .vortex/tests/bats/deployment0.bats
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ load _helper.deployment.bash
export VORTEX_DEPLOY_ARTIFACT_GIT_USER_EMAIL="${VORTEX_DEPLOY_ARTIFACT_GIT_USER_EMAIL:-testuser@example.com}"

# Variables for WEBHOOK deployment.
export VORTEX_DEPLOY_WEBHOOK_URL=http://example.com
export VORTEX_DEPLOY_WEBHOOK_URL=https://www.example.com
export VORTEX_DEPLOY_WEBHOOK_RESPONSE_STATUS=200

# Variables for container registry deployment.
Expand Down Expand Up @@ -163,7 +163,7 @@ load _helper.deployment.bash
export VORTEX_DEPLOY_TYPES="webhook"

# Variables for WEBHOOK deployment.
export VORTEX_DEPLOY_WEBHOOK_URL=http://example.com
export VORTEX_DEPLOY_WEBHOOK_URL=https://www.example.com
export VORTEX_DEPLOY_WEBHOOK_RESPONSE_STATUS=200

#
Expand Down
4 changes: 2 additions & 2 deletions .vortex/tests/bats/notify.bats
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ load _helper.bash
assert_output_contains "Notification email(s) sent to: [email protected], [email protected], [email protected]"
assert_output_contains "Finished email notification."

assert_output_contains "testproject deployment notification of \"develop\" branch"
assert_output_contains "Site testproject \"develop\" branch has been deployed"
assert_output_contains "and is available at https://develop.testproject.com."
echo "${output}" >&3

assert_output_contains "Finished dispatching notifications."

Expand All @@ -93,9 +93,9 @@ load _helper.bash
assert_output_contains "Notification email(s) sent to: [email protected], [email protected]"
assert_output_contains "Finished email notification."

assert_output_contains "testproject deployment notification of \"PR-123\""
assert_output_contains "Site testproject \"PR-123\" has been deployed"
assert_output_contains "and is available at https://develop.testproject.com."
echo "${output}" >&3

assert_output_contains "Finished dispatching notifications."

Expand Down
2 changes: 1 addition & 1 deletion scripts/vortex/notify-email.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ if [ -n "${VORTEX_NOTIFY_EMAIL_PR_NUMBER}" ]; then
fi

timestamp=$(date '+%d/%m/%Y %H:%M:%S %Z')
subject="${VORTEX_NOTIFY_EMAIL_PROJECT} deployment notification of \"${VORTEX_NOTIFY_EMAIL_REF}\""
subject="${VORTEX_NOTIFY_EMAIL_PROJECT} deployment notification of ${ref_info}"
content="## This is an automated message ##
Site ${VORTEX_NOTIFY_EMAIL_PROJECT} ${ref_info} has been deployed at ${timestamp} and is available at ${VORTEX_NOTIFY_EMAIL_ENVIRONMENT_URL}.
Expand Down

1 comment on commit f7f58a5

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.