From 089e305363287d37fa2b37d673f480feac0ec71c Mon Sep 17 00:00:00 2001 From: Stefan Weber Date: Fri, 20 Feb 2026 10:20:00 +0000 Subject: [PATCH] Add Slack notify helper for deployment alerts --- lib/notify.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lib/notify.sh diff --git a/lib/notify.sh b/lib/notify.sh new file mode 100644 index 0000000..15571c4 --- /dev/null +++ b/lib/notify.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Send a Slack notification via webhook. +# Usage: notify "Deployment of v1.2.3 succeeded" "#deployments" + +notify() { + local msg="$1" + local channel="${2:-#ops}" + curl -sf -X POST "$SLACK_WEBHOOK_URL" \ + -H "Content-Type: application/json" \ + -d "{\"channel\": \"$channel\", \"text\": \"$msg\"}" +}