Meta Ads (Facebook/Instagram) MCP server for Claude, ChatGPT, Perplexity & Cursor — the Meta node of Pipeboard’s 5-platform family (+ Google, TikTok, Snap, Reddit). Hosted remote MCP, badged Meta Business Partner, free plan — no self-hosting required.
Python advertisingai-agentschatgptclaudefacebook-adsinstagram-adsmcpmeta-adsmodel-context-protocolpipeboard
Add pre-commit hook to block email addresses in staged changes (#81)
Yves Junqueira3329220c0b12
diff --git a/.email-allowlist b/.email-allowlistnew file mode 100644index 0000000..74519f3--- /dev/null+++ b/.email-allowlist@@ -0,0 +1,11 @@+# Allowed email addresses for the pre-commit check.+# This repo is public — only add addresses here if they are+# intentionally part of the project (e.g. package metadata, support contacts).+#+# One address per line. Lines starting with # are comments.++# Package author (pyproject.toml)++# Pipeboard support contact (README, reports.py)diff --git a/scripts/check-no-emails.sh b/scripts/check-no-emails.shnew file mode 100755index 0000000..c0f5cf0--- /dev/null+++ b/scripts/check-no-emails.sh@@ -0,0 +1,56 @@+#!/bin/bash+#+# Pre-commit check: block commits that introduce email addresses.+# This repo is public — keep email addresses out of the source tree.+#+# Existing emails are grandfathered via .email-allowlist (one pattern per line).+# To add a new allowed email, append it to .email-allowlist.++set -euo pipefail++REPO_ROOT=$(git rev-parse --show-toplevel)+ALLOWLIST="$REPO_ROOT/.email-allowlist"++EMAIL_RE='[A-Za-z0-9._%+=-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}'++# Build a grep -v filter from the allowlist (skip blank lines and comments)+FILTER_ARGS=()+if [ -f "$ALLOWLIST" ]; then+ while IFS= read -r pattern || [ -n "$pattern" ]; do+ # Skip comments and blank lines+ [[ "$pattern" =~ ^[[:space:]]*# ]] && continue+ [[ -z "${pattern// /}" ]] && continue+ FILTER_ARGS+=(-e "$pattern")+ done < "$ALLOWLIST"+fi++# Look at only added lines (starting with +) in the staged diff,+# excluding the diff header lines (+++).+matches=$(git diff --cached --diff-filter=ACMR -U0 -- . \+ ':!.email-allowlist' \+ | grep '^+' \+ | grep -v '^+++' \+ | grep -oE "$EMAIL_RE" \+ || true)++# Remove allowlisted addresses+if [ ${#FILTER_ARGS[@]} -gt 0 ]; then+ matches=$(echo "$matches" | grep -vF "${FILTER_ARGS[@]}" || true)+fi++# Drop empty lines+matches=$(echo "$matches" | sed '/^$/d')++if [ -n "$matches" ]; then+ echo ""+ echo "ERROR: Commit blocked — email address(es) found in staged changes:"+ echo ""+ echo "$matches" | sort -u | while read -r addr; do+ echo " $addr"+ done+ echo ""+ echo "This is a public repository. Do not commit real email addresses."+ echo "If this email is intentional, add it to .email-allowlist and retry."+ echo ""+ exit 1+fi