Recipes
A cookbook of ready-to-copy workflows that combine bb commands with jq and shell to solve the patterns we see most often. Each recipe is a complete, runnable script — drop it into a CI job or a dotfile and adjust workspace/repo names.
If you are looking for the primitives these recipes are built on, see the Scripting & Automation guide and the CI/CD Integration guide.
Available recipes
Section titled “Available recipes” Auto-merge when CI is green Poll bb pr checks until all checks pass, then merge — the GitOps-friendly way.
Bulk reviewer assignment Assign a fixed list of reviewers across many open PRs (team rotations, onboarding).
Fork synchronization Fetch upstream, rebase your fork, and push the result for fork-based contribution flows.
Reporting & analytics with jq Count PRs per state, sum diff sizes, group by author, and export to CSV.
Retry wrapper for transient failures A shell wrapper that retries bb invocations with exponential backoff for persistent flakes.
Conventions used in these recipes
Section titled “Conventions used in these recipes”- All recipes assume
bb auth loginhas already succeeded (interactively or viaBB_USERNAME/BB_API_TOKENenv vars). WORKSPACEandREPOare referenced as shell variables — set them at the top of the script or export them from your CI environment.- The CLI already retries transient HTTP 429 / 5xx errors up to 3 times with exponential backoff. The retry wrapper recipe is only for failures that persist past that.
--jsonoutput shapes are stable; see the JSON Output reference for the envelope structure of list-style commands.