Visual Studio Team Services (VSTS) Integration jira server
Connecting to Visual Studio Team Services jira server
This process requires an existing Microsoft account with VSTS git projects.
- On your Jira Server dashboard menu, go to Git > Manage Git Repositories.
- The git configuration page for connecting repositories is displayed.
- On the Auto-connect integration panel, click Microsoft.
- On the following screen, select Visual Studio Team Services (VSTS):
- Enter your personal access token (PAT) on the provided field.
In your VSTS repository account setting, the PAT should be set to
All accessible accounts. As for the Selected scopes:
Code (read) – This scope
allows only to view commits and smart commits, and browse repositories
(if enabled) of connected VSTS repositories inside Jira.
Code (read and write) – This
scope has the
Code (read) functions plus the ability to
create branches and pull request to specified VSTS repositories via developer
panel of a Jira issue.
If you have not yet generated a personal access token (PAT):
- Go to your VSTS repository then navigate to your Account >
- On the left sidebar, select Personal access tokens then
- Enter a descriptive name for your PAT. Since this is a connection to
Jira, you can name it for example,
- Select desired expiration.
- For Accounts, we recommend to set it to All accessible accounts.
- On the Authorized Scopes, choose the scope
that this token will authorize for your specific tasks (see the note above).
- Click Create Token to finish creating your PAT.
When you're done, make sure to copy and save the token. This token can be
used as your password.
- Click Connect to continue.
- Login to your Microsoft account, if prompted.
- On the following dialog, Git Integration for Jira add-on will read all
available repositories from VSTS. Click
Repositories of the logged-in Microsoft user can be automatically connected to
Jira Server. Repositories that are added or removed from VSTS will be
likewise connected or disconnected from Jira Server.
- After the import process, the Settings dialog is displayed:
Click Finish. For now, only git
projects are supported from VSTS.
- On the Integration Settings, setting the Require User PAT
ON, will require users to provide a PAT specific for branch and
pull requests (via the developer panel on the Jira issue page). The recommended Selected scopes setting for this is
Code (read and write). For more information on this feature, see
Integration Settings: Require User PAT .
Smart Commits and Repository Browser to enable/disable these features.
- Set Project Permissions according to your organization's
project association rules.
Setting Up Visual Studio Team Services Web Links
The Git Integration for Jira add-on automatically configures web
linking for VSTS git repositories in Jira Server.
The pull request feature works the same as merge request.
To create a pull request and merge it to the main source (master):
- On your Jira Server, open the Jira issue where your previously created a branch.
- On the developer panel under Git Source Code,
click Create Pull Request.
- The following dialog is displayed:
- Select Repository from the list.
- Choose the newly-created branch as the Source branch.
- Set master as the Target branch.
- Enter a descriptive title or leave it as is (recommended).
Require User PAT option
is enabled in the Integration Settings and a user PAT isn't configured yet for the selected repository
via Repository Browser, the dialog below is displayed instead:
If an invalid PAT was configured for the
selected repository, the pull request creation process will fail.
Click Create to create the pull request.
The pull request is listed on the developer panel of the Jira issue page.
The pull request is also ready for approval by the reviewers in your VSTS
Merging Branch to master
Continuing from the above steps, the current branch is ready for merge.
- On the Team Explorer, update your local repository by performing a
- Go to Pull Requests.
The pending pull request items are displayed here. Pull requests
requires the approval of the reviewers before it can be merged from the VS IDE.
- Go to Branches. Click
- The following screen is displayed:
Click Merge to continue.
- Set the source to the branch to which you pushed the commits.
- Set the target branch to master.
The reviewer's approval is required to completely merge the pull request. This
usually takes place in the VSTS portal where your updated code is being reviewed.
Once approved, the team leader or reviewer can then complete the merge. The
commit can be viewed in the associated Jira issue page.