Create Git branches from Jira tickets
Project description
bfjira - Branch Management with JIRA Integration
bfjira (branch from Jira) is a command-line utility that simplifies the process of creating Git branches based on JIRA ticket information. It ensures that branch names are consistent and informative by incorporating the issue type and summary from the JIRA ticket.
Installation
The recommended way to install bfjira is via pip
from PyPI:
pip install bfjira
Make sure you have pip
installed and are using a virtual environment if necessary.
Usage
To use bfjira, you must have the following environment variables set:
JIRA_SERVER
: Your JIRA server URL.JIRA_EMAIL
: The email address associated with your JIRA account.JIRA_API_TOKEN
: Your JIRA API token.
Optionally, you can set the JIRA_TICKET_PREFIX
environment variable to use a default prefix other than "SRE" for ticket IDs that are entered without a prefix.
Basic Commands
-
Show help message:
bfjira --help
-
Create a branch for a JIRA ticket:
bfjira --ticket SRE-1234
If you only have the ticket number, bfjira will use the default prefix ("SRE" or whatever is set in
JIRA_TICKET_PREFIX
):bfjira -t 1234
Advanced Options
-
Set a custom issue type for the branch:
bfjira -t 1234 --issue-type hotfix
-
Create a branch without setting the upstream:
bfjira -t 1234 --no-upstream
-
Increase output verbosity (useful for debugging):
bfjira -t 1234 -v
Contributing
Contributions to bfjira are welcome! Please read the contributing guidelines before submitting pull requests.
License
bfjira is released under the GNU General Public License. See the LICENSE file for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.