feat: Ensure we're given a JID and a password
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
989661a1c7
commit
567c0af254
@ -30,6 +30,18 @@ if [[ -n "${PLUGIN_XMPP_IS_MUC}" ]]; then
|
|||||||
BOT_ALIAS=(-a "${PLUGIN_XMPP_ALIAS:-"Woodpecker CI"}")
|
BOT_ALIAS=(-a "${PLUGIN_XMPP_ALIAS:-"Woodpecker CI"}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Sanity checks
|
||||||
|
CANCEL=""
|
||||||
|
if [[ -z "${XMPP_JID}" ]]; then
|
||||||
|
echo "Error: No JID specified using XMPP_JID"
|
||||||
|
CANCEL="y"
|
||||||
|
fi
|
||||||
|
if [[ -z "${XMPP_PASSWORD}" ]]; then
|
||||||
|
echo "Error: No password specified using XMPP_PASSWORD"
|
||||||
|
CANCEL="y"
|
||||||
|
fi
|
||||||
|
[[ -n "${CANCEL}" ]] && exit 1
|
||||||
|
|
||||||
# "Post" the message
|
# "Post" the message
|
||||||
# Disable SC2086 (double quote to prevent word splitting) and SC2068 (double quote array expansion to prevent word splitting)
|
# Disable SC2086 (double quote to prevent word splitting) and SC2068 (double quote array expansion to prevent word splitting)
|
||||||
# because we DO want word splitting here.
|
# because we DO want word splitting here.
|
||||||
|
Loading…
Reference in New Issue
Block a user