branchify

Crates.iobranchify
lib.rsbranchify
version0.1.0
sourcesrc
created_at2022-04-27 14:35:02.445185
updated_at2022-04-27 14:35:02.445185
descriptionFormat a ticket number and summary into a Git branch name
homepage
repositoryhttps://github.com/amjerm/branchify
max_upload_size
id576074
size10,213
Adam Jermstad (amjerm)

documentation

README

Tests Passing

branchify

Git branch name helper written in Rust.

Usage

Pass a ticket number and summary separated by a tab character via stdin and receive a feature branch name.

# command
echo "FOO-123\tThis is a ticket" | branchify

#output
feature/FOO-123-this-is-a-ticket

Specifying a branch type

# command
echo "FOO-123\tThis is a ticket" | branchify -t hotfix

#output
hotfix/FOO-123-this-is-a-ticket

With a prefix before the branch type

# command
echo "FOO-123\tThis is a ticket" | branchify -p adam

#output
adam/feature/FOO-123-this-is-a-ticket

The branch name will also be truncated to 40 characters

# command
echo "FOO-123\tThis ticket has a longer name"| branchify

#output
feature/FOO-123-this-ticket-has-a-longer

Used in conjunction with jira-cli and fzf

# command
git checkout -b $(jira issue list --plain --columns key, summary | fzf | branchify)
Commit count: 24

cargo fmt