Giter Club home page Giter Club logo

jirac's Introduction

JIRAc: comment helper

// It's about comments, stupid!

Goal

Automate JIRA comment creation from Git commits for a Maven project.

This command line tool will generate a formatted comment for JIRA right into your clipboard that you can then paste into a JIRA comment and get a result such as the following:

JIRA comment screenshot

Downloads

Latest

git clone ;-)

Installation

Linux

  1. install Git and other dependencies

    sudo apt-get update
    sudo apt-get install git xmlstarlet xclip
  2. clone the repo on your disk, for example in your home directory

    git clone https://github.com/jirac/jirac.git ~/jirac
  3. add jirac directory to your PATH, for example by adding a line to your .bashrc

    echo "export PATH=~/jirac:$PATH" >> ~/.bashrc
  4. make sure the environement variable VISUAL or EDITOR is set.

    # test with the following command
    echo "if this [$VISUAL$EDITOR] is empty, you must set either property VISUAL or EDITOR"
    # add vim as your editor in your .bashrc with the following command
    echo "export EDITOR=vim" >> ~/.bashrc
  5. you are done

Windows

  1. install Git Bash
  2. install mktemp and include its bin folder in PATH
  3. install XMLStarlet
  4. clone this repo ;) and include the clone directory in PATH
  5. define environment variable VISUAL or EDITOR (e.g.: "vim")
  6. done

Mac users

To install and update jirac, use homebrew. See the readme of jirac homebrew recipe.

Quick note on editor export

If you plan to export a graphical editor (such as gedit, Sublime Text etc), you should already know you HAVE TO specify specific options ("-w -s" for gedit, "-n -w" for Sublime) in the editor export so that it BLOCKS the calling script.

Obviously regardless of the editor you use, escape spaces in its path before exporting it!

Execution

jirac may be executed from the any directory of a Maven project version controlled with Git. Otherwise an informative message will be displayed.

After selecting one or more commits, either interactively or with command line arguments, jirac will generate a formatted text for JIRA with the following information and copy it to your clipboard:

  • name of the projet
  • current branch
  • current version [for each selected commit]
  • commit subject
    • link the commit in the GIT graphical interface of the project (if any)
    • content

Why jirac only shows pushed commits

jirac generates a link to the GIT graphical interface of the project (if any).

Such URL is based on the id of the commit which can not be assumed to be definitive unless the commit has been pushed and shared with other.

Therefore, to remain on the safe side, jirac enforces pushed commit selection.

Detailed documentation

See the jirac online guide.

Troubleshooting

๐Ÿ˜จ

Create a Github issue if needed with as much as details as you can.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.