Gerrit

Using Jira Server or Data CenterSee the corresponding article.

 

Integrate Gerrit with Jira Cloud

Quickly learn how to connect Gerrit git repositories via Git Integration for Jira Cloud.

What's on this page:


Right click here to open this video in a new browser tab for more viewing options.

Auto-connect Integration

  1. On your Jira Cloud dashboard, go to menu AppsGit Integration: Manage Git repositories.

  2. Click Gerrit on the Auto-connect integration panel. The Auto-connect wizard appears.

    • Enter your git server’s Host URL.

    • Enter login credentials for username and password.

  3. Click Next. The Auto-connect wizard automatically reads git repositories for import into the git configuration.

  4. Click Next. The Settings screen is displayed.

    • Set Project Permissions by restricting it to specific projects or leave it as is (associate with all projects).

  5. Click Connect to complete this setup.

Single Repository (Manually Connect via SSH/HTTP/HTTPS)

BigBrassBand recommends to use the Auto-Connect integration for Gerrit.

Login to your Gerrit account. Obtain the repository URL from the Gerrit repository project page.  Use SSH or HTTP/HTTPS.

  1. On your Jira Cloud dashboard menu, go to Apps ➜ Git Integration: Manage Git repositories.

  2. Click Connect to Git Repository to open the Connect Wizard.

  3. Paste the URL from Gerrit web portal in the provided box.
    (For example: http(s)://<your.org.com>/<repo_name>)

  4. Click Next. The Settings page is displayed.

    • Set Project Permissions by restricting it to specific projects or leave it as is (associate with all projects).

  5. Click Finish to complete this process. 

The repository is now connected to Jira Cloud.

Web links are automatically configured for Gerrit repositories with Auto-connect integration.

Viewing Git Commits in Jira Server

  1. Perform a git commit by adding the Jira issue key in the commit message. This will associate the commit to the mentioned Jira issue.

  2. Open the Jira issue.

  3. Scroll down to the Activity panel then click the Git Commits tab.

  4. Click View Full Commit to view the code diff.

Default Branch

Most git integrations allow changing of the default branch of the repository/project other than "master".  This change is reflected in the  Repository Settings of the Git Integration for Jira app on the next reindex.  Auto-connected integrations support this feature where Git Integration for Jira app gets the default branch from almost all integrations and apply this setting at repository level. 

For the case with Gerrit, the default main branch is always “master”.

Main branch for repositories within an integration can only be changed on the git server.