Docs
CLICode

Change requests (CR)

Create, review and merge CRs (alias co pr)

co cr creates, reviews and merges change requests (CRs). A CR is the same as a pull request in other tools, and you can also call it as co pr. Run inside a cloned repository and co picks up the repository and branch. Outside one, give --repo <workspace/repo>.

All options are in co cr <command> --help.

Open a CR

co issue develop 123                  # create a branch from Issue-123
# … commit, git push -u origin HEAD …
co cr create -t "Fix login bug" -b "…"     # CR from the current branch to main (opens an editor without -b)
co cr create -t "…" -b "…" --draft    # as a draft

If the branch name is <type>/<issue number>-<description> (for example feat/123-login), that issue is linked automatically. To turn this off, pass --issue none. The target branch defaults to the defaults.targetBranch setting, or main if it is not set.

Find and read

co status                             # my CRs and issues by role
co cr list                            # open CRs I created
co cr list --project CORE             # open CRs in repositories linked to a project (any author)
co cr view 4312                       # details (--web opens the browser)
co cr diff 4312 --name-only           # changed files
co cr checks 4312                     # CI results

Review

co cr checkout 4312                   # fetch the source branch and switch to it
co cr review 4312 -a                  # approve
co cr review 4312 -r -b "Please add tests"  # request changes (body required)
co cr comment 4312 -b "LGTM"          # comment

Merge

co cr merge 4312 --dry-run            # only check conflicts and rule violations
co cr conflicts 4312                  # conflicting files and hunks
co cr update-branch 4312              # bring in the latest target branch
co cr merge 4312 -s -d                # squash merge, then delete the source branch

If you do not give a merge method (-s squash, -m merge, -r rebase), co merges with a merge commit. If the repository does not allow merge commits, co does not merge and tells you which methods are allowed.

Other commands

CommandWhat it does
editEdit the title, description, reviewers, labels and linked issues
close · reopenClose, reopen
link · unlinkLink or unlink an issue
link-doc · unlink-docLink or unlink a doc
activityTimeline of status changes, reviews and comments
statusOnly my CRs by role (co status includes issues)
developSame as co issue develop

Editing and deleting comments is not in the CLI. Use the web.

Table of Contents

AI tools

Was this helpful?