Skip to content

Baarsgaard/jig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Jig

Jira Integration with Git CLI.

Jig is an attempt at making it easier for me and my colleagues to collaborate on jira issues.
Specifically:

  • Making it simpler to create branches with descriptive names.
  • Automatically include issue key in commits.
  • Simplifying issue administration and workflow
    • Creating Worklogs.
    • Transitioning issues.
    • Assigning to others.
    • Bonus: Scripting Jira interactions.

Usage

$ jig help

A Jira CLI integration with Git

Usage: jig <COMMAND>

Commands:
  assign      Assign user to issue
  branch      Create and checkout branch using issue key with(out) summary as branch name
  comment     Create comment on a Jira Issue
  completion  Generate completion script
  configs     List config file locations
  hook        Install git commit-msg hook
  init        Initialise config file(s)
  worklog     Create a work log entry on a Jira issue
  transition  Move ticket through transitions
  open        Open issue in your browser
  query       Interactively send JQL queries to Jira when tab is pressed
  upgrade     Download and install latest version
  help        Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version
# Create or checkout branch named after an issue.
jig branch
# Work on that branch and commit as usual. git add/commit/push.

# Make comments as you progress with your work.
jig comment "Note: Changed impl due to X"

# Create worklogs as you finish up a session or at the end of the day.
jig log 1h --comment "Bug squashed"

# Transition issue according to your workflow.
jig move

asciicast

Installation

See releases for installation instructions: releases

Compile from source

Compile from source with Rust-lang with

cargo install --locked --git https://github.com/baarsgaard/jig
# Optionally add `--features cloud` to enable ApiV3/Cloud only features.

Configuration

Supports Global and Local config files.
~/.config/jig/config.toml and .jig.toml respectively (XDG).
If both exist, they are merged with the Local config taking priority.

See example_config.toml

Generate your configuration using:

jig init [--all]
Why?

I personally love a strict Git workflow with well designed PRs and every commit being attributed to an issue.
But convincing others to adopt this can be a challenge without obvious benefits.

An obvious use case being my own workflow:
Most if not all my work at $day_job is coordinated through and logged in Jira.
additionally I'm not a fan of doing simple tasks in the Jira UI..

I always know the issue I am currently working on, I am on the branch already.
Why could I not log my time or comment more easily? Maybe directly from the terminal even?

Looking at the existing CLI tools that interacted with Jira, none solved my exact problem.
Hence, Jig!

Jig is designed to simplify working with a "Per issue" branching model.
It therefore includes options and features I needed to support that.

Primarily:

  • Creating or checking out branches from existing Jira issues with(out) summaries.
  • Quickly logging time and Commenting on the issue found in the branch name.
  • Moving issues from one status to the next.
  • Scripting, I live for automation.