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

Global

JIRA and git credentials are required in ~/.config/jolly_brancher.ini it contains all the global settings.

Example:

[jira]
branch_format = {issue_type}/{ticket}-{summary}

[git]
pat = <REDACTED>

Repo

JIRA and git credentials are required in .jolly.ini in the root of the repo and overrides any global settings.

[jira]
base_url = https://<subdomain>.atlassian.net
token = <basic_auth_token>

[git]
pat = <personal_access_token>
forge_root = https://github.com/<organization_name>/

Porcelain

This project started as a python utility, but over time I have found it to be more helpful as an emacs mode, so it’s now a half lisp, half python monstrosity that is tailored exactly to my needs.

Emacs Integration

Jolly Brancher now includes a comprehensive Emacs porcelain that keeps you sane by allowing you to interact with Jira tickets directly from Emacs - no more context switching to the Jira web interface!

Jolly Brancher Emacs Interface

The Emacs porcelain provides a rich set of features:

  • List and filter tickets (my tickets, unassigned, next-up, all tickets)

  • Search tickets with JQL queries

  • Start work on tickets (creates branches automatically)

  • End work and create PRs

  • Change ticket status and type directly from Emacs

  • Create new tickets

  • View tickets in browser when needed

  • Syntax highlighting for ticket information

Key bindings are available through the C-c j prefix or through the interactive menu (C-c j j).

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.1.1.tar.gz (92.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jolly_brancher-1.1.1-py2.py3-none-any.whl (34.9 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: jolly_brancher-1.1.1.tar.gz
  • Upload date:
  • Size: 92.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for jolly_brancher-1.1.1.tar.gz
Algorithm Hash digest
SHA256 bd79d6a0152412b502e57371012835c24487efe8bc1d90badd95c897fa61cf41
MD5 b2ffb4304eb94f5671c6055c67cadbcd
BLAKE2b-256 326eb6a85f955224488a37ecc2cd7df71a2390904f7f5f179b692acae83848f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jolly_brancher-1.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 129ff56241d92ec3b823139a1441cbf879c6476599a7bed60d4479b9416392f9
MD5 74603ecac8bc18802a8aa67a8459ecb4
BLAKE2b-256 506ff4fc28c2e85f54273c275dcbb34cf6016386ce7f5ca2adaeebd2fbebc7ec

See more details on using hashes here.

Supported by

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