From 72b95ecc41c2097432cf71a2adcdfd4e187c9ddc Mon Sep 17 00:00:00 2001 From: Jonathan Zhang Date: Thu, 30 Apr 2026 15:49:36 -0700 Subject: [PATCH] docs: add bootstrap-dependabot-config.sh section The auto-merge workflow needs `.github/dependabot.yml` to exist in target repos for Dependabot to open PRs. Document the new bootstrap script and its ecosystem detection rules. Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index aa85210..5e39ce2 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,24 @@ See [`callers/pr-review.yml`](https://github.com/topcoder1/ci-workflows/blob/mai The script reads `ANTHROPIC_API_KEY` from env, falling back to 1Password (`op://Private/ANTHROPIC_PR_REVIEW_KEY/credential`). +It installs both `pr-review.yml` and `dependabot-auto-merge.yml` callers, sets workflow perms to write, enables auto-merge on the repo, and creates a branch ruleset. + +## Bootstrap a `dependabot.yml` across the fleet + +The auto-merge workflow only fires on Dependabot PRs — and Dependabot only opens PRs when a `.github/dependabot.yml` exists in the target repo. Use this script to add a baseline config (ecosystems auto-detected) to repos that don't have one yet: + +```bash +# Dry-run (default): print what would be added per repo +~/.claude/templates/ci-workflows/scripts/bootstrap-dependabot-config.sh \ + topcoder1/foo whois-api-llc/bar + +# Apply: open a PR per repo with auto-merge armed +~/.claude/templates/ci-workflows/scripts/bootstrap-dependabot-config.sh --apply \ + --from-list repos.txt +``` + +Detection (any matching marker file → ecosystem enabled): `package.json` → npm; `pyproject.toml` / `requirements*.txt` / `setup.py` / `Pipfile` → pip; `go.mod` → gomod; `Cargo.toml` → cargo; `Gemfile` → bundler; `composer.json` → composer; `Dockerfile*` → docker; any `.github/workflows/*.yml` → github-actions. Cadence is weekly; minor + patch updates are grouped per ecosystem; PR cap is 5 per ecosystem. + ## Rotate the API key fleet-wide ```bash