GitButler ⧓

Commands
>_

but pr

Commands for creating and managing reviews on a forge, e.g. GitHub PRs or GitLab MRs.

If you are authenticated with a forge using but config forge auth, you can use the but pr or but mr commands to create pull requests (or merge requests) on the remote repository for your branches.

Running but pr without a subcommand defaults to but pr new, which will prompt you to select a branch to create a PR for.

Usage: but pr <COMMAND> [OPTIONS]

Subcommands

but pr new

Create a new review for a branch. If no branch is specified, you will be prompted to select one. If there is only one branch without a review, you will be asked to confirm

Usage: but pr new [BRANCH] [OPTIONS]

Arguments:

  • <BRANCH> — The branch to create a review for

Options:

  • -m, --message <MESSAGE> — review title and description. The first line is the title, the rest is the description
  • -F, --file <FILE> — Read review title and description from file. The first line is the title, the rest is the description
  • -f, --with-force — Force push even if it's not fast-forward (defaults to true) (default: true)
  • -s, --skip-force-push-protection — Skip force push protection checks
  • --no-hooks — Bypass pre-push hooks
  • -t, --default — Use the default content for the review title and description, skipping any prompts. If the branch contains only a single commit, the commit message will be used (default: false)
  • -d, --draft — Whether to create reviews as a draft (default: false)

but pr auto-merge

Enable or disable the automatic merging of a review or reviews. If no reviews are specified, you will be prompted to select one or multiple of the review associated with branches in your workspace

Usage: but pr auto-merge [SELECTOR] [OPTIONS]

Arguments:

  • <SELECTOR> — The target of this operation. This can be one or multiple (comma-separated):
  • Branch names,
  • Branch IDs,
  • Stack IDs (in which case, all the reviews associated with the stacked branches are selected),
  • Associated review IDs (i.e. PR numeric IDs or MR numeric IDs, without the symbol).

Options:

  • -d, --off — Whether to disable the automatic merging of the review(s) (default: false)

but pr set-draft

Set an existing review (or set of reviews) as draft. If no reviews are specified, you will be prompted to select one or multiple of the review associated with branches in your workspace

Usage: but pr set-draft [SELECTOR]

Arguments:

  • <SELECTOR> — The target of this operation. This can be one or multiple (comma-separated):
  • Branch names,
  • Branch IDs,
  • Stack IDs (in which case, all the reviews associated with the stacked branches are selected),
  • Associated review IDs (i.e. PR numeric IDs or MR numeric IDs, without the symbol).

but pr set-ready

Set an existing review (or set of reviews) as ready-to-review. If no reviews are specified, you will be prompted to select one or multiple of the review associated with branches in your workspace

Usage: but pr set-ready [SELECTOR]

Arguments:

  • <SELECTOR> — The target of this operation. This can be one or multiple (comma-separated):
  • Branch names,
  • Branch IDs,
  • Stack IDs (in which case, all the reviews associated with the stacked branches are selected),
  • Associated review IDs (i.e. PR numeric IDs or MR numeric IDs, without the symbol).

but pr template

Configure the template to use for review descriptions. This will list all available templates found in the repository and allow you to select one

Usage: but pr template [TEMPLATE_PATH]

Arguments:

  • <TEMPLATE_PATH> — Path to the review template file within the repository

Options

  • -d, --draft — Whether to create reviews as a draft (default: false)

Last updated on

On this page

Edit on GitHubGive us feedback