From 640870680041dee4891515d6ca228973682cb646 Mon Sep 17 00:00:00 2001 From: janpeter visser Date: Sat, 2 May 2026 20:14:28 +0200 Subject: [PATCH] =?UTF-8?q?fix(bootstrap):=20require=20GitHub-linked=20GIT?= =?UTF-8?q?=5FAUTHOR=5FEMAIL=20=E2=80=94=20Vercel=20deploy=20block?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vercel rejected the smoke-test deploy with "The deployment was blocked because the commit author email (agent@scrum4me.local) is not valid. Ensure your git email matches your GitHub account." The default `agent@scrum4me.local` in repo-bootstrap.sh was a phony local domain not tied to any GitHub account. Vercel's deploy-protection checks the latest commit's author email and blocks unknown ones. Fix: error out with a helpful message if GIT_AUTHOR_EMAIL is unset, and document the GitHub noreply form (`+@users.noreply.github.com`) in `.env.example` as the recommended choice. Co-Authored-By: Claude Opus 4.7 (1M context) --- .env.example | 13 +++++++++++++ bin/repo-bootstrap.sh | 15 +++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 08deb9c..1cc4a76 100644 --- a/.env.example +++ b/.env.example @@ -44,6 +44,19 @@ GH_TOKEN=ghp_vervang-mij # producten/repos toevoegt aan Scrum4Me. GH_PRECLONE_REPOS=madhura68/Scrum4Me,madhura68/scrum4me-mcp +# ----- Git commit-author ------------------------------------- +# Verplicht — Vercel weigert deploys waarvan de commit-author email +# niet aan een GitHub-account hangt ("commit author email is not +# valid"). Gebruik de noreply-vorm voor maximale privacy: +# +# github.com → Settings → Emails → "Keep my email private" +# formaat: +@users.noreply.github.com +# +# Voorbeeld voor madhura68: +# GIT_AUTHOR_EMAIL=12345678+madhura68@users.noreply.github.com +GIT_AUTHOR_NAME=Scrum4Me Agent +GIT_AUTHOR_EMAIL=vervang-mij@users.noreply.github.com + # ----- Scrum4Me database ------------------------------------ # Beide URLs uit het Neon-dashboard. DATABASE_URL is pooled, # DIRECT_URL is unpooled — scrum4me-mcp gebruikt DATABASE_URL diff --git a/bin/repo-bootstrap.sh b/bin/repo-bootstrap.sh index a646d8a..850c42f 100644 --- a/bin/repo-bootstrap.sh +++ b/bin/repo-bootstrap.sh @@ -38,9 +38,20 @@ if [[ ! -f "$CREDS_FILE" ]] || ! grep -q "oauth2:${GH_TOKEN}@github.com" "$CREDS log "git credentials helper configured at ${CREDS_FILE}" fi -# Prevent the token from leaking into commit-author of automated commits. +# Commit-author identity. GIT_AUTHOR_EMAIL MUST be a valid GitHub-linked +# address — Vercel rejects deployments whose latest commit has an +# unknown author email ("commit author email is not valid"). Easiest +# choice: the no-reply form `+@users.noreply.github.com` +# (find it on github.com → Settings → Emails → "Keep my email private"). +if [[ -z "${GIT_AUTHOR_EMAIL:-}" ]]; then + log "ERROR: GIT_AUTHOR_EMAIL not set. Vercel will reject deploys whose" + log " commit author email isn't tied to a GitHub account." + log " Use the noreply form, e.g.:" + log " GIT_AUTHOR_EMAIL=12345678+madhura68@users.noreply.github.com" + exit 2 +fi git config --global user.name "${GIT_AUTHOR_NAME:-Scrum4Me Agent}" -git config --global user.email "${GIT_AUTHOR_EMAIL:-agent@scrum4me.local}" +git config --global user.email "${GIT_AUTHOR_EMAIL}" # ----- 2. clone-or-fetch each repo -------------------------------------- mkdir -p "$HOME/Projects"