diff --git a/matrix-notifier b/matrix-notifier index ab9a6e4..cffecf8 100755 --- a/matrix-notifier +++ b/matrix-notifier @@ -40,7 +40,12 @@ rawurlencode() { default_drone_message() { local msg="Build ${DRONE_BUILD_STATUS}" - msg="$msg ${DRONE_SYSTEM_PROTO}://${DRONE_SYSTEM_HOST}/${DRONE_REPO}/${DRONE_BUILD_NUMBER}" + local drone_url="${DRONE_SYSTEM_PROTO}://${DRONE_SYSTEM_HOST}/${DRONE_REPO}/${DRONE_BUILD_NUMBER}" + if [ "$FORMAT" == "true" ]; then + msg="$msg [URL HERE]($drone_url)" + else + msg="$msg $drone_url" + fi msg="$msg (${DRONE_TAG:-$DRONE_BRANCH})" printf '%s' "$msg" }