Git Integration for Jira Self-Managed (Data Center/Server) Documentation

Contact Support
GitKraken Status  

Associate Pull/Merge Requests to Issues Based on Commits

Introduction

Starting with v3.7.2+ of the Git Integration for Jira Server and Data Center app, we have added a new setting that allows for pull request (PR) and merge request (MR) indexing via API in General Settings. Additionally, in earlier versions, automatic indexing of PR/MRs cannot be avoided for auto-connect integrations.

Pull/merge requests appear automatically in the Git Integration panel based on the commits associated with the pull/merge request. This allows users who did not mention a Jira issue key in the PR/MR title or description, they will still be linked.

This feature supports integrations such as GitHub, GitLab and Microsoft TFS/VSTS/Azure. However, AWS CodeCommit is not supported because there is no ability to get commits of a pull request via API.

 

Getting Started

The following settings are implemented in the Manage git repositories page ➜ General settings under Git pull/merge requests:


 

Enable pull/merge request creation in Jira issues

This setting will show or hide the function for creating pull/merge requests from the Jira developer panel. This setting is ON by default.

 

Enable indexing pull/merge requests via API

This setting will index PR/MRs that are associated to Jira issues based on pull/merge request title which includes the Jira issue key. This setting is ON by default.

Turn off this setting for improved Jira performance. Note that the API calls increase the number of calls to the git server – by one additional API call per each merge/pull request.

There are corresponding API calls to get merge/pull request commits, at least in the below integrations:

 

Enable indexing pull/merge requests by commits

This setting will index PR/MRs that are associated to Jira issues based on commits related to pull/merge requests with commit message containing a Jira issue key. This setting is OFF by default. Users will not be able to toggle this setting to ON/OFF if the Enable indexing pull/requests via API is switched OFF.

Turning this setting ON does not call commits on acquiring for existing pull/merge requests in their unchanged state. As a result, the Git Integration app won’t be filling the commit association information for already connected integrations.

Commits will be indexed for new/changed PR/MRs only. This will significantly reduce the number of calls to the git server. The current implementation automatically detects changes even for Microsoft pull requests which doesn’t have the lastUpdateTime field.

When switched to ON, the Enable indexing pull/merge requests via API setting completely activates the feature of indexing of PRs/MRs. This also allows users to use the toggle control for the Enable indexing pull/merge requests by commits setting, which provides an additional way of indexing when switched to ON.

 

Guidelines

What to do with the rate limit issues?

With the index settings above, the rate limit issues can be ignored. At least, the user may turn the feature off, connect an integration, wait until the reindexing is completed, and then turn the feature back on.

 

Do I need to do a Reset index?

The commits for existing PR/MRs are not needed to be retrieved again, so there’s no need to do a reset index.

 

Will this affect repositories with webhooks? Will webhooks trigger reindexing a repository via API to get PRs via commits?

Yes. Any indexing of repo (manually, via API, webhooks) will call reindexing a repository to get PRs via commits

Are draft PR/MR supported?

Yes. The pull/merge request drafts can be associated to a Jira issue by having a Jira issue key in the description.

 

Recommendations

We highly recommend setting the Reindex Interval setting (in General Settings) to no longer than every 24hrs when possible.

 

See more Git Integration for Jira app features

Manager permissions (Git Integration for Jira Data Center)

Cancel indexing (Git Integration for Jira Data Center)

Pull request filters (Git Integration for Jira Data Center)

Tag filters (Git Integration for Jira Data Center)

Indexing queue viewer (Git Integration for Jira Data Center)

Deep linking feature (Git Integration for Jira Data Center)

GitHub App integration (Git Integration for Jira Data Center)

Git Integration + ScriptRunner (Git Integration for Jira Data Center)

Git Integration + Jira Automation (Git Integration for Jira Data Center)

Enforced git permissions for Jira users – Features (Git Integration for Jira Data Center)

Shared reindex queue between DC nodes (Git Integration for Jira Data Center)

Smart commits overview (Git Integration for Jira Data Center)

Associate Pull/Merge Requests to Issues Based on Commits (this page)

Creating branches (Git Integration for Jira Data Center)

Creating pull/merge requests (Git Integration for Jira Data Center)

Issue Git integration panel – Features (Git Integration for Jira Data Center)

Have feedback about this article? Did we miss something? Let us know!
On this page