Updates the existing nested repository using the REST API.
url
{JiraBaseURL}/rest/gitplugin/1.0/repository
method
PUT
Parameters
The Request body is a JSON structure similar to the Update Existing Repository API plus the id parameter:
Field | Description |
---|---|
id | Integer. Required.
This is the ID of the existing nested repository. For example, The Update Repository API will look for the repository with |
displayName | String. Optional.
This is the name that will appear in the Git Integration for Jira app repositories list. |
mainBranch | String. Read-only.
The specified branch will intend to organize the Git Commit tab. A commit will not be shown in other branches if it is a part of the main branch. By default, “master” will be used if a main branch is not specified. |
disabled | Boolean. Optional.
Set the repository status to updated (enabled) or disabled. If left blank, the default setting for this field is false. UPDATE |
enableFetches | Boolean. Read-only.
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. |
sendCommitEmails | Boolean. Optional.
Enables or disables commit notification emails for this repository. |
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. |
global | Boolean. Optional.
If set to true, the projectMappingIds parameter is ignored. Otherwise the |
projectMappingIds | Long [ ]. Array. Optional.
These are numeric projects IDs associated with the repository. When you create a new repository and set the field gitViewerEnabled to true, at least one project must be associated with it. Example: |
hosted | Internal field. Read-only.
This field will show whether the repository is hosted on Jira or not. |
revisionIndexing | Boolean. Optional.
This setting turn on/off indexing of revisions, for instance, git commits. This setting also 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). |
gitViewerEnabled | Boolean. Optional.
Enables or disables the Repository Browser feature for this repository. The default setting for this setting 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. |
username | String. Read-only.
Set as username for the git host. Leave blank if 2FA is enabled. Otherwise, fill this in if password has changed. |
encryptedPassword | String. Read-only.
Set as password for the git host. Leave blank if 2FA is enabled. Otherwise, fill this in if password has changed. |
encryptedPat | String. Read-only.
This field accepts personal access token from supported git hosts. Fill this in if 2FA is enabled for the git host and if the PAT has changed. |
requireUserPat | String. Read-only. Default is false.
Setting this field to true will require users to provide their personal access tokens (PAT) specific for branch and pull/merge request operations. |
disableSslVerification | Boolean. Read-only.
The SSL Verify setting is set to false by default. If set to true, 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: VERSION 4.8.x Manage repositories ➜ Actions ➜ Edit repository settings. VERSION 5+ Manage integrations ➜ Actions ➜ Edit repository. |
smartCommitsEnabled | Boolean. Optional.
This setting is enabled by default. Enables/disables smart commits processing for this repository or tracked folder. The default setting for this field is true. |
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: |
fileAddedFormat, fileModifiedFormat, fileDeletedFormat |
String. Optional.
This is the URL to display content of added, modified or deleted files. Use the following variables:
|
mergeRequestFormat | String. Optional.
This is the URL to display content of pull/merge requests on the git server. Use the following variables:
|
branchLinkFormat | String. Optional.
This is the URL to display a branch on the git server. Use the following variables:
|
commitsValidationRequired | Boolean. Read-only.
This setting is only applicable to self-hosted git servers. For example, you are hosting your git repositories in your own server such as GitLab CE/EE or GitHub Enterprise. If a developer tries to push a commit without the issue key in its message, the push is rejected by the Git Integration for Jira app. If this setting is enabled, the commit messages are validated according to the following rules:
|
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. |
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. |
trustFolderStat | Boolean. Optional.
When the The default setting for Jira Data Center is false.
|
refSpecHeads | Boolean. Read-only.
This is a reference to |
refSpecTags | Boolean. Read-only.
This is a reference to |
refSpecNotes | Boolean. Optional.
This is a reference to
|
refSpecChanges | Boolean. Optional.
This is a reference to |
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. |
state | Integer. Read-only. This is the indexing state of the nested repository: QUEUED, UPDATED, SCANNING, ERROR. |
The login credentials are not inherited for nested repositories to interact with external APIs and .git is based on the integration’s credentials.
Response
Updates the newly changed parameters to the selected repository.
Example:
http://jira.yourorg.com/rest/gitplugin/1.0/repository.json
Request body (JSON) example:
{
"id": 3,
"maxMinsToCommitEmail": 1441,
"gitViewerEnabled": false
}
Response:
{
"id": 3,
"displayName": "acmecorp",
"origin": "https://gitlab.com/wileycoyote/acmecorp.git",
"mainBranch": "master",
"root": "/jira/home/data/git-plugin/3_acmecorp",
"realRoot": "3_acmecorp",
"absoluteRoot": false,
"disabled": false,
"enableFetches": true,
"sendCommitEmails": true,
"maxMinsToCommitEmail": 1441,
"global": true,
"hosted": false,
"initDate": 1513662080381,
"lastIndexedDate": 1586232584347,
"revisionIndexing": true,
"gitViewerEnabled": false,
"disableSslVerification": false,
"smartCommitsEnabled": true,
"webLinkType": "gitlab",
"viewFormat": "",
"changesetFormat": "https://gitlab.com/wileycoyote/acmecorp/commit/${rev}",
"fileAddedFormat": "https://gitlab.com/wileycoyote/acmecorp/commit/${rev}#diff-${num}",
"fileModifiedFormat": "https://gitlab.com/wileycoyote/acmecorp/commit/${rev}#diff-${num}",
"fileDeletedFormat": "https://gitlab.com/wileycoyote/acmecorp/commit/${rev}#diff-${num}",
"mergeRequestFormat": "https://gitlab.com/wileycoyote/acmecorp/merge_requests/${mergereqId}",
"branchLinkFormat": "https://gitlab.com/wileycoyote/acmecorp/tree/${branch}",
"commitsValidationRequired": true,
"projectMappingIds":[],
"trackedFolderId": 1,
"showAllTags": true,
"sourcesDiffViewEnabled": true,
"refSpecNotes": true,
"refSpecChanges": false,
"trustFolderStat": false
}
Repository REST APIs
Enable/disable Existing Repository
Update Existing Nested Repository (this page)