Crates.io | branchify |
lib.rs | branchify |
version | 0.1.0 |
source | src |
created_at | 2022-04-27 14:35:02.445185 |
updated_at | 2022-04-27 14:35:02.445185 |
description | Format a ticket number and summary into a Git branch name |
homepage | |
repository | https://github.com/amjerm/branchify |
max_upload_size | |
id | 576074 |
size | 10,213 |
Git branch name helper written in Rust.
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)