Repository Browser

The Repository Browser allows users to view git repositories of configured projects via the Git menu on the Jira dashboard.

fyi
As of version 2.5+ of the Git Add-on, the Git dropdown menu is added to the dashboard.
warning
Users must have the View Development Tools project permission in order to gain access to the Repository Browser. For more information on assigning Jira permissions, see Managing Permissions in Jira open in new tab.
note
The Git dropdown header is hidden for all users if there are no repositories with Repository Browser enabled for that user.  The Git add-on will always show the Git header to Jira administrators.
The Git dropdown header is visible to other users who have repositories with Repository Browser enabled and have no history of using the Repository Browser (for example - no previously viewed or favorited repositores).

To view all repositories, select Git dropdown in the dashboard menu then View all repositories.

Repository Browser git menu

Available git repositories of configured projects are displayed:

  • Clicking Manage Repositories at the top right of the screen will open the git add-on repositories page.
  • Click a git repository to browse its contents.
  • In repository view, clicking Repositories at the top right of the screen will open the git add-on repositories page.
  • Select a branch from the dropdown list to browse repository contents for that branch (default view is master branch).
  • Click a folder to view its contents. Click a file to view its code diff.
  • Click on an issue link under Commit message to view that ticket.
  • Click on the commit id Latest commit: UUID link to view code diff for that commit.
  • Click on an item link under Latest commit column to view code diff for that particular commit.
note
With v2.6.0 of the Git add-on, revisions of the commits are displayed on the Repository Browser in addition to branches and tags. See Repository Browser - Commits tab, for further information.
warning
If the selected path is a root of the repository and no files are present, a message will be displayed instead of an empty file list.
helpful tip
Administrators can turn off the repository browser via advanced settings of a repository in the add-on configuration.
fyi
The displayed repositories can be sorted by clicking the corresponding list header.  The add-on will remember the sorting choice per user.

Viewing List of Commits via Repository Browser

In the Repository Browser, click the Commits tab.

The list of commits for the currently selected project is displayed in decending order:

  • Select a branch from the dropdown list to browse commits for that branch (default view is master branch).  The branches and tags are sorted in reverse alphanumeric order putting the latest tags and branches at the top of the list.
  • Click on an issue link to view that ticket.
  • Click on a commit id commit ID to view commit information and code diffs related to that commit.

Comparing Branches/Tags in the Repository Browser

In the Repository Browser, click the Compare page tab.

On this page, two branches from the current repository can be compared.  The Git add-on will show the commit of the first found branch on this screen.

A diff between the base branch and the compare branch is displayed:

Repository Browser compare commit screen

To view interesting results, use the following selection scenarios:

  • select master as base; select the most recent branch as compare.
  • select master as base; select a tag with a version release.
  • select different branches as base and compare. (Example: TYT-212 against TYT-316)

Click to swap the base and the compare selection.

The Summary page displays the Commits, Aggregated Lines by Developers and Files.  Click on a file to view its code diff.

Click Commits on the sidebar to view the list of commits resulting from this compare.  The adjacent figure indicates the number of commits associated to this compare.

Click Diff on the sidebar to view code diffs of the selected range of commits with the path and name of the affected files.

Click Issues on the sidebar to view list of unique Jira issues related to commits. Introduced v2.10.0

On the Issues page, clicking the View all XX issues with JQL text label will open the Search page with passed query of a list of Jira issues found based from the compare criteria. Introduced v2.10.0
For example, the JQL will look like issuekey in (GIT-1851, GIT-1159, GITCL-284, GITCL-254).

Enable/Disable Repository Browser via Repository Configuration

Go to  cog Administration  > Add-ons  >  Git Integration Plugin for Jira  > Git Repositories.

helpful tip
If using Jira 7, go to Administration  > Add-ons. Select Applications on the page tab. Under Git Integration Plugin for Jira on the sidebar, select Git Repositories.

Click  cog  Actions > Edit  to modify required repository settings.  The Advanced setup screen for configuring repositories is displayed.

Scroll down to the Repository Browser option.

Repository Browser configuration

Select Enabled to activate this function for this repository. Choose Disabled to deactivate this function from this repository.

Add one or more existing projects in the Associate Project Permissions field to associate this git repository to the specified projects.  Administrators can view commit information via the commit ID URL link. For non-admin users from unspecified projects, the commit ID URL link will be inaccessible.

Checking the Associate with all projects box will hide the existing associated projects in the Associate Project Permissions field and disable it.  All existing associated projects in that field are still retained. When this setting is active, this git repository will be available to all existing projects in Jira.

Click Update to save configuration changes for this repository.