Opening a pull or merge request

From the branch you are on, with the target, title and template filled in, and a push first when the branch needs one.

Repository ▸ New Pull Request… opens a request from the branch you have checked out — New Merge Request… on GitLab. So do the Command Palette and the + in the section’s title bar. It is unavailable on a detached HEAD, while Git is busy, and without a GitHub or GitLab remote.

The sheet opens on the remote the section lists, names the repository the request will open on, and shows its branches as source → target.

What it starts with

  • Target Branch — the branch yours came from, when the remote has it, and otherwise the repository’s default branch.
  • Title — the subject of the branch’s only commit, with its body as the description; with more than one commit, the branch’s name in words.
  • Description — the repository’s request template, when its default branch has one, in place of the commit’s body.
  • Create as draft opens it as a draft.

Everything can be changed before Create, and Return in the title creates. Reviewers are not part of the sheet: add them afterwards with Edit….

A branch that is not on the remote yet

When the remote does not have your branch, or lacks some of its commits, the sheet says the branch will be pushed first, and its button reads Push and Create. The push is the ordinary one, never forced; once it has finished, the request is sent. If the request cannot be created, the sheet comes back with what you typed.

From a fork

Choose the upstream in the section’s title bar, and the request opens there from the branch in your fork. Innesta checks that your fork’s remote really is a fork of that repository, and says so when your branch pushes somewhere else.

A request that is already open

Each provider allows one open request from a branch into a target. When the chosen target has one, the sheet names it, and its button becomes Show Pull Request. Another target can still be chosen.

Once a request has been created, the section lists the remote’s open requests and selects the new one.