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

Contact Support
GitKraken Status  

Bulk Export API

The API returns a file with the plugin configuration.

Only Jira admins can perform the Bulk Export API call.

Bulk Export Configuration

url

{JiraBaseURL}/rest/gitplugin/1.0/configuration

method

GET

Download sample file
Right click the link and save it somewhere accessible:
configuration_get.py

Example:

Usage:
user@home:~$ python configuration_get.py > conf.tsv

Parameters

Edit the TSV file by referring to the parameters below:

Column/Field Description
id Integer. Required.

Assign an ID number to a repository. This is required if you wish to update or edit existing repositories by setting this value to their equivalent IDs. If this field is left blank, the repository will be created as new.

When importing to a new server, the id field must be blank.

realRoot StringOptional on existing servers.

This is the local path to the repository on the server where your Jira service is running. This will point the Git Integration for Jira app to a clone of the repository hosted locally with Jira.

This field corresponds to the Repository root input box in the Advanced setup/Repository settings.

The realRoot field may refer to an existing repository on a new server. If “root” doesn’t exist, this field must be blank.

If this field is specified, absoluteRoot must also be defined.

absoluteRoot Boolean. Optional.

This field corresponds to the Cloned root location input field in the Advanced setup/Repository settings.

If set to true, the repository is automatically managed by Git Integration for Jira app (stored in $JiraHOME).

If set to false, the repository is manually configured by the Jira administrator.

If this field is specified, realRoot must also be defined.

origin String. Required.

This is the URL to the hosted git service used on the project. For example, you might host your repository on GitHub, Beanstalk or your own server.

BigBrassBand recommends to use the git@<url>:[your-git-repo].git format for the repository origin URL and adding of SSH Keys for each git host in the Git Integration app configuration page.

For HTTPS git repositories, obtain the URL from your git host then set your login credentials in the username and password (or pat) field to connect to them.

The repository origin may not be hosted on the same server as Jira.

displayName String. Optional. Some git hosts may require this to be filled in.

Define a meaningful name for this repository configuration. If this field is left blank, the default value is obtained from the origin.

enableFetches Boolean. Optional.

Set to true to enable fetches on git repositories hosted on remote servers.

Set to false to enable fetches on git repositories hosted on the same server as Jira.

See section Enable Fetches in Connecting a repository via Advanced setup. The default boolean value for this field is true.

revisionIndexing Boolean. Optional. 

The default boolean value for this field is true.

This option turns on the memory cache which is used when list of commits are displayed. Set to true if revision indexing will index and link to any mentioned issue keys in the revision history or not (false).

mainBranch String. Optional.

Set specific branch as the main branch for this repository. The default value is “master”.

See section Main Branch in Connecting a repository via Advanced setup.

username, password String. Optional.

Leave blank if 2FA is enabled for the git host.

pat String. Optional.

Required, if 2FA is enabled for the git host. This field accepts personal access token from supported git hosts.

gitViewerEnabled Boolean. Optional.

Enables or disables the Repository Browser feature for this repository. The default setting for this option is enabled.

Users must have the View Development Tools project permission in order to use this feature. Consult your Jira System Administrator on permissions.

For more information, see section, Repository Browser.

projectMapping Long [ ]. Array. Optional.

These are numeric projects IDs associated with the repository.

  • This field accepts list of comma separated project IDs for project mapping. Trailing spaces are ignored (equivalent to unchecking the Associate to All Projects checkbox in the Advanced Setup dialog). Example: 10000,10100
  • If you change an existing repository, leaving this field blank will use the existing values of the repository configuration.
  • Setting this field to ALL will retain projectMapping settings and sets “All Projects” flag to true (equivalent to checking the Associate to All Projects checkbox in the Advanced Setup dialog).

If projects are not associated to the repository, you must leave this field blank and set the gitViewerEnable field to false.

smartCommitsEnabled Boolean. Optional.

This setting is enabled by default. Enables/disables smart commits processing for this repository or tracked folder. The default value for this field is true.

sendCommitEmails Boolean. Optional.

Send commit notification emails for this repository. If left blank, the default value for this field is true.

maxMinsToCommitEmail Integer. Optional.

Set the desired value in minutes, as to when commit notifications will be sent. Commit notifications will be e-mailed if the age of the commit is less than or equal to this value. Default value is 1440 minutes.

webLinkType String. Optional.

Set web link type equivalent to the connected git host. Set web linking formats by referring to Git Integration for Jira: Web linking.

viewFormat String. Optional.

This URL is unused and not being configured for the newly added integration types.

changesetFormat String. Optional.

This is the URL used to display revision.
Use the following variable: ${rev}  – git revision

fileAddedFormat, fileModifiedFormat, fileDeletedFormat String. Optional.

This is the URL to display content of added, modified or deleted files.
Use the following variables:

  • ${num} –  number of change (0, 1, …)
  • ${rev}  –  git revision
  • ${path}  –  path of the file being changed
  • ${parent}  –  parent git revision
  • ${blob}  –  ID of blob object
  • ${parent_blob}  –  ID of parent blob object
  • $convert(${branch},"subStr","newSubStr")  –  this inline function returns branch name with subStr replaced by a newSubStr. The ${branch} supports the character requirements on some hosting services.
mergeRequestFormat String. Optional.

This is the URL to display content of pull/merge requests on the git server.  Use the following variables:

${mergereqId} – ID of the pull/merge request

branchLinkFormat String. Optional.

This is the URL to display a branch on the git server.  Use the following variables:

${branch} – Name of the branch

disabled Boolean. Optional.

Add this repository into the Git Integration app configuration and set its status to updated (enabled) or disabled. If left blank, the default value for this field is false.

hosted Internal field. Read-only.

This field will show whether the repository is hosted on Jira or not.

tagsFilter String. Optional. 

Displays all tags for the specific issue, if left blank. Otherwise, set tags matching pattern to display tags on issue pages that match the specified regular expression pattern.

For more information, see example in Show tags.

Set tagsFilter with a valid Java regular expression or an empty string. The filtered tags are displayed on the Jira Developer Panel.

integrationType Flag. Internal field.

This field will show whether the repository is a tracked folder, a connected git service or a simple repository.

trackedFolderId Integer. Internal field.

This field will display the ID of the “parent” repository. It can be changed in order to convert the repository to a sub-repository.

Use with caution
If the modified sub-repository is not located in the tracked folder, it will be removed by the sequential auto-reindex.

delete String. Optional.

Enter “delete” on this column/field as a confirmation to the Git Integration app to automatically remove the selected repository from the plugin configuration. If left blank, no changes will occur.

sshKeyId Integer. Optional.

This is the ID of an associated SSH key.

requireUserPat Boolean. Optional.

Setting this parameter to true will require users to specify their own PAT for branch and pull/merge request management.

sourcesDiffViewEnabled Boolean. Optional.

When enabled, this setting allows Jira users with the View Development Tools and correct Jira/Git Integration for Jira app permissions to view the commit and file diffs inside Jira.

sslVerify Boolean. Optional.

Default is true. The SSL Verify option is set to Enabled by default. If set to false, the Git Integration for Jira app will ignore verification of SSL certificates when connecting to a git server.

This setting can also be accessed via Manage git repositories ➜
Actions ➜ Edit integration/repository settings.

apiPath String. Optional.

The integration will use this relative REST API path starting with “/” to retrieve the list of tracked repositories. For more information, see article Working with Custom API path.

apiFilter String. Optional.

JMESPath filter expression will be used to filter API results. See article Working with JMESPath filters or contact support for help writing expressions.

tfsCollection String. Optional. TFS or Azure DevOps Server integrations only.

A TFS collection is a group of TFS team projects. Specify an existing TFS Collection for use with Jira integration.

awsRegion String. Optional. AWS integrations only.

Specify a region for AWS CodeCommit integration. For region values, see AWS Regions and Endpoints.

trustFolderStat Boolean. Optional.

When the trustFolderStat setting is set to false, the .git/objects/pack folder will be always scanned to check for new pack files. If set to true, the last-modified attribute of the folder will be used to check the folder for modifications.

The default value for Jira Data Center is false.

If your repository is stored on a network share, it is highly recommended to set the trustFolderStat value to false.

When adding new repositories, we recommend to leave the setting of the trustFolderStatvalue to false (default). You can change this setting later on via ActionsEdit repository settings in the Manage repositories page.

refSpecNotes Boolean. Optional.
This is a reference to refs/notes/* used for fetching. The default value for this field is true.

Git notes are not shown…

  • when refs/notes are disabled on connecting a repository;
  • when a new note comes when refs/notes is disabled.
refSpecChanges Boolean. Optional.
This is a reference to refs/changes/* used for fetching. The default value for this field is false.
refSpecCustom String. Optional.
This is a user-defined list of references used for fetching. It is a comma-separated list with the format:
+refs/refname1/*:refs/refname1/*, refs/refname2/*:refs/refname2/*, …
prHideFilter String. Optional.
Displays all pull requests for the specific issue, if left blank. Otherwise, set pull requests matching pattern to hide pull requests on issue pages that match the specified regular expression pattern.

 

Response

Generates a tab-separated values (.tsv) file. See the parameters table below for more information on each parameter in a TSV file.


Take note that the .tsv file is verified by the Git Integration for Jira app with the following rules:

  • The header row is required.

  • The order of fields specified in the header row – is the order of the fields in the following rows.

  • If a field is omitted from the header row, the Git Integration app will use the default value for a new repository. The Git Integration app will keep the current value of a repository if it already exists in the configured repositories.

  • If a repository is not listed in the .tsv file, no changes will be made if the same repository exists in the Git Integration app configuration.

 

Bulk Change REST APIs

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