Integration Guide

gitplugin logo Integration Basics

To learn on how to setup specific git repository with JIRA, follow related git host topic on the sidebar. At the end of this guide, the user will be able to grasp how easy it is to integrate git repositories with Git Integration for JIRA.

Connecting to a Git Repository

This process requires an existing git host repository.

To connect a git repository to the JIRA server via the Git add-on:

  1. (JIRA 7)  Go to Administration > Applications.
    (JIRA 6.4.x)  Go to Administration > Add-ons.
  2. Under Git Integration Plugin for JIRA, select Git Repositories.
  3. Click Connect to Git Repository.  The Connect to Git Repository Wizard appears.
  4. Enter repository url on the provided box.  Click Next.
    Initially, the repository URL can be obtained from the repository's project page.
  5. On the Authentication screen, upload or paste the private key in the respective box.  Click Next.
    If the private key requires a password it will be prompted on the screen that follows.
  6. On the Permissions screen, change settings as required or leave the default settings as is.  Click Next.
  7. Click Finish.  The repository is now connected for use with JIRA.

Linking Git Commits to JIRA Issue

 

Open a JIRA issue then go to the Git Commits tab. In this tab, you will see commits, files changed, links to external repository, commit author and more.

Linking commits to JIRA

In the above example, the issue key GIT-913 text is inserted into a git commit message to link the commit to this issue.

The git commit will get associated with the JIRA issue if the commit message includes the exact issue ID.  The Git Integration for JIRA add-on will automatically index new commits and associate the referenced issue.  For better readability, place the issue key text at the start of the commit message.

Git administrator »

If you want to enforce the commit with a hook, please install this Git commit hook script. Commit-msg Hook open in new tab .

Smart Commits

Smart Commits enable users to perform actions on JIRA issues from a single commit.  In a commit message, enter the issue key and some desired action such as resolving an issue, closing an issue, time tracking or all of them.

Smart commits

For example, if a user wants to log specified time with worklog comment, adds a comment, and resolve the issue TEST-100, enter the commit message as follows:

TEST-100 #time 2h 30m Fixed code #comment Merge to master #resolve

Enable/disable this feature via:

  • Connect to Git Repository wizard
  • Connect to Git Repository - Advanced setup
  • Add-ons/Applications > Git Repositories > Edit Repository

Repository Browser

The Repository Browser permits users to explore the repository similar to browsing a folder in Finder or Windows Explorer.

Go to the Git menu in JIRA then select View all repositories (or specific repository if it appears in the Git menu.)

The Repository Browser page is displayed.  Click a repository to view its contents.

Repository Browser

Enable/disable this feature via:

  • Connect to Git Repository wizard
  • Connect to Git Repository - Advanced setup
  • Add-ons/Applications > Git Repositories > Edit Repository