diff --git a/deploy/sentry-slack-alert.sh b/deploy/sentry-slack-alert.sh index 8172b09..9dc0d18 100755 --- a/deploy/sentry-slack-alert.sh +++ b/deploy/sentry-slack-alert.sh @@ -2,7 +2,9 @@ # Route every Waving Hands issue to a Slack channel: new issues (any level or # priority), regressions, and reappearances. Creates one Sentry workflow # via the alerts API. The token never leaves your shell: -# SENTRY_TOKEN=sntryu_... SLACK_CHANNEL_ID=C... deploy/sentry-slack-alert.sh [#channel] +# SENTRY_TOKEN=sntryu_... deploy/sentry-slack-alert.sh [#channel] +# The channel defaults to #wavinghands-notifications (C0C3R3B2MQB); pass +# SLACK_CHANNEL_ID with the channel name to route elsewhere. # The token needs the alerts:write scope (an org auth token from # https://locallygrownnet.sentry.io/settings/auth-tokens/), and Slack must # already be connected to the org under Settings → Integrations. @@ -10,7 +12,7 @@ set -euo pipefail : "${SENTRY_TOKEN:?SENTRY_TOKEN=sntryu_... is required (alerts:write)}" ORG="${SENTRY_ORG:-locallygrownnet}" PROJECT="${SENTRY_PROJECT:-waving-hands}" -CHANNEL="${1:-#waving-hands-notifications}" +CHANNEL="${1:-#wavinghands-notifications}" API="https://us.sentry.io/api/0/organizations/$ORG" AUTH="Authorization: Bearer $SENTRY_TOKEN" @@ -18,7 +20,7 @@ AUTH="Authorization: Bearer $SENTRY_TOKEN" # project's error detector is looked up by project id; a workflow is bound # to its detectors by PUT after creation. SLACK_ID="${SENTRY_SLACK_INTEGRATION:-345334}" -CHANNEL_ID="${SLACK_CHANNEL_ID:?SLACK_CHANNEL_ID=C... is required (the Slack ID of the channel)}" +CHANNEL_ID="${SLACK_CHANNEL_ID:-C0C3R3B2MQB}" PROJECT_ID="${SENTRY_PROJECT_ID:-4512133232787456}" echo "Slack integration $SLACK_ID; project $PROJECT_ID; channel $CHANNEL ($CHANNEL_ID)"