This repository has been archived. Please, follow this link https://github.com/moveworkforward/jira-jigit-plugin to get up to date code and support.
Jigit is an add-on for JIRA Server 7.0+ that provides an issue tab, which displays information about all commits referencing to the issue key. Add-on gives you a convenient way to collect commits from GitLab and GitHub. It has minimal settings: all you need to start is to provide a server name, a repository name and a personal access token. No additional settings at GitHub or GitLab are needed. Jigit interrogates servers using their public API and saves commits into a JIRA database. It doesn't clone your repositories, so no disk space is used to store sources.
- Log in to JIRA as administrator
- Choose the cog icon
- Choose the Add-ons menu.
- Click on the Jigit Plugin Config link to get into the configuration page.
How to add a new repository
Go to the configuration page and click on the Add button in the right bottom corner.
Enter following information:
- Enter an alias for your repo. This name will be displayed in the commits tabpage. Alias should be unique, you can't add two repositories with the same alias.
- Enter a host of your git server. It can be https://github.com, or https://gitlab.com, or your own instance on GitLab server, for example https://my.own.gitlab:8443
- Enter access token. Read here about how to create an access token in GitHub. Note, that Jigit uses only repo:status scope to read commits. And here you can find information about how to create access token in GitLab. Jigit uses only api scope to read commits.
- Key in a Path. It can be either a repository name or a group(in terms of GitLab)\organization(in terms of GitHub) name. A repository name usually consists of two parts and displayed in the query string of a browser. For example in the URL https://gitlab.com/gitlab-org/gitlab-ce the name of the repo is gitlab-org/gitlab-ce and the group name is gitlab-org.
- Specify a content inside a given Path: a group of repositories or a single repo.
All other data is additional:
- Select a way of branch indexing: all branches inside a repository, or only selected branches. The aim is to decrease a number of API calls if this number is limited (it's actual for https://github.com, for example). If you select "all branches" option then Jigit will make API calls even to stale branches to check wheether there are new commits.
- Default branch name. First, Jigit indexes commits from the default branch, and then from the others.
- Commit request timeout. This parameter is used when Jigit calls git server by http API. If the timeout is exceeded during a call, then the add-on stops indexing of a repository. If you see a ConnectException: Connection timed out in JIRA logs, you can increase this value to overcome it.
- Sleep timeout and number of requests parameters are used to prevent Jigit from excessive usage of server's API. By default Jigit sleeps for ten seconds every hundred commits.
Order of branch indexing
As mentioned above, at first, Jigit indexes commits from the default branch (usually, master). This means that if a commit to a branch has been merged to the default branch before start of the indexing, then it will be indexed as a commit to the default branch. The add-on starts indexing all other branches in a lexicographical order after indexing the default branch. I.e. at first, it will index the default branch, then branch develop and then branch feature-123.
How to add a new branch to be indexed
If you choose to index only concrete branches, go to the configuration page. Key in a branch name in the Branches column of a row with the configuration of target repo.
If you want a commit to be displayed on an issue tab, you should specify the issue key in the commit message. E.g. make a commit with message "fixes TST-123: new implementation of hashCode", where TST-123 is the issue key. Message can contain more than one issue key, in this case a commit in will be displayed on the tab of every mentioned issue.
Leave your proposals here in Bitbucket using this link.
I'll be grateful if you leave a feedback.