Skip to Content
We are live but in Staging 🎉
CLI GuideBranches, PRs & Checks

Branches, PRs & Checks

The collaboration surface: branch, pr, check, and diff. <repo> accepts a repo_id, name, or org/name throughout.

branch list

dodil git branch list my-service # BRANCH DEFAULT SHA # main * 9f2c41d… # feature/hello 83ab02e…

Pull requests

pr list / pr get

dodil git pr list my-service # NUMBER STATE TITLE # 1 open Add hello dodil git pr get my-service 1

pr get prints the full PR as JSON — branches, head_sha, reviews (each pinned to the sha it approved), and the checks_state rollup.

pr create

dodil git pr create my-service \ --title "Add hello" \ --head feature/hello \ --base main \ --body "Introduces hello.txt" # PR #1 opened

--title, --head, and --base are required; --body is optional.

pr approve / pr review

dodil git pr approve my-service 1 --body "LGTM" dodil git pr review my-service 1 --verdict request_changes --body "Needs tests"

approve is shorthand for review --verdict approve. Both fetch the PR’s current head_sha first and pin the verdict to it — if commits land afterwards, the approval is stale and protection can dismiss it.

pr merge / pr close

dodil git pr merge my-service 1 --method squash dodil git pr close my-service 1

--method accepts squash, merge, or rebase (server default when omitted). A merge is refused while a protection rule on the target branch is unsatisfied — missing approvals or a non-green checks rollup.

check list

dodil git check list my-service 9f2c41d… # rollup: passed # NAME STATE SUMMARY # ci/build passed … # ci/test passed …

Checks are keyed by commit sha (take one from branch list or a PR’s head_sha). rollup is the worst-of state across all checks — unspecified means none reported. Log fetching and streaming are API surfaces — see API Reference — Checks.

diff

dodil git diff my-service main feature/hello

Compares from..to (branch names or SHAs) and prints JSON: per-file status, additions/deletions, and patch text, plus totals and a truncated flag when patches exceed the size cap.

See also