#!/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\"}" }