Configure GitLab Posting User

Code reviews for your GitLab Self-Managed projects will be posted as a "PullRequest" member of your GitLab team. In order to post code reviews, the user must be created in your GitLab.

Prerequisites

The GitLab posting user must be created by an individual on your team with the following administrative permissions:

Create Posting User

Log in to your GitLab instance as an administrator and create a new user with the username PullRequest. PullRequest reviewers and systems will use this user to post code review content.

Add Posting User to Projects

Add the PullRequest user to all of the projects/repositories you want code review on. Be sure to grant the user REPORTER access so it's able to post comments.

PullRequest will never write or modify code in your repositories. Read more about how we keep your code and data secure here.

Create GitLab Access Token

Log into GitLab as the PullRequest user you just created.

This may be easier in another browser or in an incognito tab so you can remain logged in as the GitLab owner user.

Open User settings -> Access Tokens. This should be accessible from the following path:

https://our-gitlab.internal/-/profile/personal_access_tokens

Create a Personal Access Token with the following properties:

Once generated, copy the personal access token to your clipboard so we can configure the connection to GitLab.

Connecting the PullRequest Proxy to GitLab

Now, it's time to return to that text file we're editing on the proxy server. Go ahead and set the following keys based on what was configured above.

PROVIDER_TYPE=gitlab
PROVIDER_BASE_URL=https://our-gitlab.internal
PROVIDER_USERNAME=PullRequest
PROVIDER_ACCESS_TOKEN=<access_token>

Make sure the PullRequest Username is spelled exactly as the username of the PullRequest user that was created. We highly recommend "PullRequest" (all one word, PascalCase) to maintain communication consistency.

Last updated