Skip to main content

Create Git branches from Jira tickets

Project description

PyPI - Version

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 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
    
  • 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-progress flag. This is useful when you need to perform operations on the ticket without indicating that work has started.

    bfjira -t 1234 --no-progress
    

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bfjira-0.5.0.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

bfjira-0.5.0-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file bfjira-0.5.0.tar.gz.

File metadata

  • Download URL: bfjira-0.5.0.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for bfjira-0.5.0.tar.gz
Algorithm Hash digest
SHA256 3519964921cd1fdabc379d486941baa8a6e04b50016488bde0b4432787a58017
MD5 a9d348dfdc2d4830e8bbcbb27f200335
BLAKE2b-256 3dd060a169a96e12e75e723aafb7fe335e44211a18fc0118a1f6c221b63cfbe7

See more details on using hashes here.

File details

Details for the file bfjira-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: bfjira-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for bfjira-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76bcc686dab32b682074dfcfecc76e0f498e7b1f0909688cbcc643589ab0313f
MD5 be12c8e02ee05a84bfe57b078f168d77
BLAKE2b-256 5d639c27a4bccb48bd8de5b0bd0a0189bb3d08d859f2db550dd6296b443d005a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page