Skip to main content

CLI tool that creates git branches from JIRA tickets

Project description

pre-commit.ci status

A sweet branch creation suite

Description

The overarching goal here is to facilitate developer time and remove duplicative work.

As a developer, I am more productive (and more descriptive) when I only have to write the description for what I’m working one one time (or barring that, as few times as possible).

In order to streamline and facilitate the developer’s workflow this tool aims to connect an arbitrary ticketing system (currently only JIRA is supported) to a git forge (currently only GitHub is supported).

Usage

Jolly brancher will, given a repository location create branches from JIRA tickets that automatically include ticket information in the branch, and branch name.

Given the repository base directory, you are provided with a list of repositories that you can act on (with tab completion):

https://user-images.githubusercontent.com/419355/136826488-41e3e3ab-20c2-4618-a5ee-ab4f1f6b3413.png

After choosing a repository, you can either create a branch based on the contents of a ticket

https://user-images.githubusercontent.com/419355/136839214-8beb4b9d-346e-4fcf-9ee8-fd1358915a91.png

Alternatively, if the branch name is well formed, you can create a PR against the parent of the branch, the tool will ask some questions and construct the body of the PR (it scans the CODEOWNERS file and suggests those users as tags), and create it:

https://user-images.githubusercontent.com/419355/136839631-232dacf2-b884-4545-ba09-02a133123852.png

If you decline to do so, then you will be redirected to the branch creation flow:

https://user-images.githubusercontent.com/419355/136839347-81d64f0d-d74d-4c35-b37e-adb787c832b0.png

It will further create a pull review from an existing branch that is well formed:

https://user-images.githubusercontent.com/419355/136630520-097fb7c5-86f4-43f3-a409-850ebd7cf825.png

It automatically populates the PR description with information from the ticket

https://user-images.githubusercontent.com/419355/136630685-c7c52d09-c51b-47e1-bcd3-60bb05518e5d.png

Configuration

JIRA and git credentials are required in ~/.config/jolly_brancher.ini in the following format:

[jira]
auth_email = <author@domain.com>
base_url = https://<subdomain>.atlassian.net
token = <basic_auth_token>

[git]
pat = <personal_access_token>
repo_root = <~/path/to/local/repositories>
forge_root = https://github.com/<organization_name>/

Future Features

  • Extract the contents of the comments in the branch and construct a description of the changes in the branch

  • Perform in place analysis of the branch and add information to the PR - Were any tests added?s - Run unit tests / linter (fetch from github actions) - Include other interesting statistics

  • Automatically tag the owner of the files that were changed

  • Pull the acceptance criteria from the ticket and format it into a list of checkboxes so the developer can indicate which are met by the current revision

Deploy

  • Manually bump version in setup.py

  • make deploy

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

jolly_brancher-1.0.5.tar.gz (58.4 kB view details)

Uploaded Source

Built Distribution

jolly_brancher-1.0.5-py2.py3-none-any.whl (17.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file jolly_brancher-1.0.5.tar.gz.

File metadata

  • Download URL: jolly_brancher-1.0.5.tar.gz
  • Upload date:
  • Size: 58.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.15

File hashes

Hashes for jolly_brancher-1.0.5.tar.gz
Algorithm Hash digest
SHA256 a03f20a79ce2245a459f9df4cfc97d0e463b2634fb5bf2ae95eb7ef9b0843d3c
MD5 cede9ec98cf803bfad024cf2fbe889fa
BLAKE2b-256 643dfdff624ccff84f614b0b9772e8b1392d09c1ee80db9093c0849671d477a2

See more details on using hashes here.

File details

Details for the file jolly_brancher-1.0.5-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for jolly_brancher-1.0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 06110660bf39801cd0d067e83b880c9cfaff471d21692be9eb91760465763209
MD5 b06557c312996dfe1bd1d2f07b06a0de
BLAKE2b-256 988e6dd80bdfc4bfc753b42cc2640259ca1fb39e3ea0e516c603ecf9b6bfb359

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