Pull requests

Table Of contents

  1. Title and tense
  2. Branch naming
  3. Description
    1. How to create a pull request from command line?
  4. Delevopment
  5. After your pull request is ready

Title and tense

For those recommendations visit this page.

Branch naming

Branch name must be structured as follows:

<type>/<optional scope>/<optional title>

Optional title is the description part of the title shortened to about one or two words for pull request. You can use it even then a scope isn’t specified.

  • Scope and title are both optional, but you must use at least one of them in the branch name

Examples:

  • feat/merchant/shop_status - type/scope/title
  • feat/customer/stripe - type/scope/title
  • feat/comment - type/title
  • cl/grafana - type/title
  • docs/merchant - type/scope

Description

Description contains a concise description of changes made by pull request.

It’s mostly enough to just put an unordered list with all commits made by the change. For that you can use gihub-cli.


How to create a pull request from command line?

If you’ve already installed github-cli and run gh auth login, run the following from your local branch:

gh pr create

This will create a pull request and if you press e when it prompts you to edit it’s description, then it will open the editor you set with git config core.editor <editor> and will have an unordered list with all commit messages from your local branch as it’s content. (It surrounds all list items with asterisks (**) for some reason, I recommend you to remove them.)

Delevopment

When creating a pull request, you must specify which issues your pull request closes, if any.

After your pull request is ready

If your pull request is ready for review, assign a reviewer and wait.