Note: GitLab integration is only available in Behave Pro version 2.1.0 and later!

Before you can connect Behave Pro to GitLab, you will need to set up an OAuth application on your GitLab instance. This OAuth application will be used by Jira to create, modify, or delete feature files in your repositories.

First, navigate to the admin area on your GitLab instance.

Next, select the "Applications" from the left menu.

Next, create a new application. You will need to put in the correct redirect URI and any arbitrary name of your choice. The name of the application does not matter.

The redirect URI consists of your Jira's base URL together with /rest/behavepro/1.0/git/gitlab/links/callback You can find your exact base url by going to Jira's Administration -> "System" -> "General Settings" section. See an example in the screenshot below.

You will need to select the "api" from the list of Scopes! Without this the git integration will not work.

Create the application by clicking on the [Create] button and a new page will appear as shown in the image below. Make sure you copy the "Application ID" and "Secret" values. You will need those to create a connection from Jira.

After you have created the application, go back to Jira and navigate to the Administration admin page of your Jira instance, click "Manage apps", and select the "Manage GitLab on the left navigation menu.

Click [Add] button to add a new GitLab connection and a dialog window will appear. Fill in the "GitLab name" which can be any name you wish to choose. Fill in the GitLab's base URL (this is the same URL you can see when you go to the GitLab's welcome page) and copy paste the "Application ID" and "Secret" when you have created the application on GitLab.

When you click "Submit" you will be redirected to GitLab and will be asked to Authorize the connection.

Note: It matters which user you are logged-in when authorizing the connection! Behave Pro will be only able to access repositories under the GitLab user you are logged-in. It is highly recommended that you create a machine user for this connection and give that user access to the repositories you want Behave Pro to have access to.

Click [Authorize] and you will be redirected back to Jira and the new connection will be added and listed on the GitLab connections list as shown below in the screenshot.

That's all. You are now able to use git integration for this GitLab instance from any of your Jira projects. You can continue by reading the following documentation in order to set up a Jira project: Connecting GitLab to Jira project.

Did this answer your question?