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.
Instructions for creating a Jira API token can be found here
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 version:
bfjira --version -
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 --verbose
-
Optionally prevent transitioning the ticket to 'In Progress':
By default, the script transitions the specified JIRA ticket to 'In Progress'. If you wish to create a branch for the ticket without changing its status, use the
--no-progressflag. This is useful when you need to perform operations on the ticket without indicating that work has started.bfjira -t 1234 --no-progress
-
Handle uncommitted changes:
If
bfjiradetects uncommitted changes (including untracked files) in your repository, it will prompt you before proceeding. You can choose to have the script automatically stash these changes. The stash will be automatically popped after the branch is successfully created and the JIRA ticket is transitioned. If you choose not to stash, the script will exit.
Versioning
bfjira follows Semantic Versioning (SemVer) for its releases:
- MAJOR version (X.0.0) - Incompatible API changes
- MINOR version (0.X.0) - New features in a backward-compatible manner
- PATCH version (0.0.X) - Backward-compatible bug fixes
The versioning is automated through GitHub Actions, which:
- Detects the type of change (feature, fix, etc.) from commit messages
- Automatically increments the appropriate version number
- Creates a new release and publishes to PyPI
Troubleshooting
Common Issues
-
JIRA Authentication Errors
- Ensure your
JIRA_API_TOKENis valid and not expired - Verify your
JIRA_EMAILmatches the account associated with the API token - Check that your JIRA account has the necessary permissions
- Ensure your
-
Branch Creation Issues
- Make sure you're in a Git repository
- Verify you have write permissions to the repository
- Check that the branch name doesn't already exist
-
Version Mismatches
- If you encounter version-related issues, try updating to the latest version:
pip install --upgrade bfjira
- If you encounter version-related issues, try updating to the latest version:
Getting Help
If you encounter issues not covered here:
- Check the GitHub Issues for similar problems
- Enable verbose output with
--verboseflag for more detailed error messages - Open a new issue with detailed information about your problem
Development
Setup
bfjira uses Poetry for dependency management and packaging. To set up the development environment:
-
Install Poetry:
curl -sSL https://install.python-poetry.org | python3 -
-
Clone the repository:
git clone https://github.com/nwhobart/bfjira.git cd bfjira
-
Install dependencies:
poetry install -
Activate the virtual environment:
poetry shell
Running Tests
Run the test suite with:
poetry run pytest
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.
Metadata
Release files for bfjira 0.7.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bfjira-0.7.11.tar.gz | 17.9 kB | With provenance | Details for bfjira-0.7.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bfjira-0.7.11-py3-none-any.whl | Python 3 | none | any | Details for bfjira-0.7.11-py3-none-any.whl |
Total release size: 37.6 kB
Release files / bfjira-0.7.11.tar.gz
| Download URL | bfjira-0.7.11.tar.gz |
|---|---|
| Size | 17.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74073b52d280ffa83a2c788a1557bc796d1fd502e139b5a09838542db42fe284
|
|
BLAKE2b-256 checksum How to use checksums |
5d502cd4f52131b402d9a052f2a0a2cb5251d57522ed1f4da9c683bdd49139d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / bfjira-0.7.11-py3-none-any.whl
| Download URL | bfjira-0.7.11-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3e81f3d15de500125e7eaaf69b57ef158a29c3669eab7bc9be0d4990b0a7239
|
|
BLAKE2b-256 checksum How to use checksums |
054cedf6963b7f1a26d1b6cf410d9d74d3e66961ea5416335268ce8f681a1ef1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logSecurity for bfjira 0.7.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for bfjira-0.7.11.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.