1.1.10 • Published 10 months ago

@ezweave/what-name-branch v1.1.10

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

what-name-branch

Hello reader! How many times has this happened to you? You're out walking your dog and your boss jumps out of a bush.

Boss: "We've got a production bug you have to fix right now!"

You know the fix, but what to call it? Do you include the issue title? Will a short description be enough?

myCatsBreathSmells-like-cat-food

There's got to be a better way!

A much saner approach is to just be opinionated and specific, which is what I've done!

Table of Contents

Opinionated Branch Names

My favored approach to branch naming is three pieces, directly related to the issue (or whatever your software management suite calls it):

  • name: what is the id used by your software management tool (aka Jira, etc)?
  • type: of issue. Is this a bug, story, or a spike?
  • description: the description from the title of the issue.

Simply put:

npm.io

I would name the branch: story/PRP-42031169/i-needed-an-issue-for-a-screenshot-so-here-it-be.

This tells me that it's a story, references the ID (in this case, the Jira one), and includes enough of a description where I can tell what I or someone else was doing.

In contrast to a branch name like: PRP-42031169 or even PRP-42031169/screenshot it gives me a bit more context, especially if the branch hangs around for a bit (e.g. I am switching between branches, for some reason), and even helps after the branch is closed and merged.

This reduces "side trips" to Jira (in this case) to try and suss out just what the heck-poop you were doing with branch fix-things or whatever.

Table of Contents

Installation

Via npm:

npm install -g @ezweave/what-name-branch

Via yarn:

yarn global add @ezweave/what-name-branch

Table of Contents

Usage

name-branch

This will start asking you three short questions.

First, get the name/id from your software management tool (Jira, in our case):

npm.io

Second, select your issue type:

npm.io

Third, enter the description. name-branch will strip out unsafe characters and replace them with -, so go nuts:

npm.io

Now you have a branch name:

npm.io

Tada! Now you can get back to arguing about important things like vim vs emacs.

Table of Contents

1.1.9

10 months ago

1.1.8

10 months ago

1.1.10

10 months ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago