Install these tools before working on this repository:
- yq (Mike Farah's, not Python yq) — used by all shell tooling to read
repos.yaml - Go 1.25+ — for building and testing the tools in
tools/ - ShellCheck — for linting shell scripts (
make shellcheck) - gh — GitHub CLI, used by CI scripts and the rebase-status tool
- jq — used by several shell scripts for JSON processing
For running actual rebases (not required for config/hook changes):
- podman or docker — rebasebot runs in a container
- rebasebot — the rebase engine itself; see the rebasebot repo
- A
~/.rebasebot/secrets/directory with GitHub tokens
Always run make test before committing. It checks:
repos.yamlis valid and config prefixes have matching files- Generated files match the SSOT (
make generate+git diff) - All shell scripts parse without errors (
bash -n) - Every config loads successfully for its branch
- The
resolve-config.shscript maps targets to the correct config names - Every hook script referenced in a config exists on disk
- Go unit tests pass for all tools
- The 90-test auto-rebase decision/triage test suite passes
Additionally, make shellcheck lints all scripts (run separately or in CI).
When a new upstream release comes out (e.g., Velero v1.18.3):
- Edit
versions/oadp-1.X.env— update the relevant*_TAGand*_SHAvariables - Run
make generate— regenerates hook scripts anddocs/version-matrix.md - Run
make test— validates everything is consistent - Commit both the versions file and all generated files
- Add the repo entry to
repos.yamlwith org, repo name, wave, config_prefix, and optionallymin_branch,max_branch,dev_branch,main_only, orimages - Create config files in
rebase-configs/for each branch the repo supports, named<config_prefix>_<branch>.env.sh - Create or adapt any hook scripts the repo needs in
rebasebot-hook-scripts/and reference them from the config files - Run
make generate— updatesdocs/version-matrix.mdand generates version-specific hooks - Run
make test
- Create
versions/oadp-1.7.envwith all upstream tag variables - Update
min_branch/max_branchinrepos.yamlif any repos are being added or removed for this version - Create config files in
rebase-configs/for each repo that has the new branch - Copy and adapt version-specific hook scripts in
rebasebot-hook-scripts/— most hooks differ only by the branch name on one line, so copy from the previous version and update the branch - Run
make generate— creates generated hooks (go-replace_velero_*,verify-tag-sha_*) and updates the version matrix - Run
make test
Most hook scripts are hand-maintained files in rebasebot-hook-scripts/. A few are generated from the SSOT — see the "do not edit manually" header in go-replace_velero_*.sh and verify-tag-sha_*.sh.
For hand-maintained hooks:
- Create or edit the script directly in
rebasebot-hook-scripts/ - Reference it from the relevant config files in
rebase-configs/ - Run
make test—verify-hooksconfirms every referenced file exists
For generated hooks (go-replace_velero_*, verify-tag-sha_*):
- Modify the generator script in
tools/generate-*.sh - Run
make generate - Review the changes across all generated files
- Run
make test
See CLAUDE.md for a concise overview. For deeper architecture details including data flow, the wave system, and hook execution, see AGENTS.md.