Configure GitLab Webhooks

After the GitLab posting user has been created and the repositories are populating in PullRequest successfully, the GitLab webhooks can be configured.

Configure Webhooks

GitLab allows webhooks to be configured on a GitLab Group level or per Project within a Group.

PullRequest strongly recommends configuring webhooks on the Group level so that new Projects your team creates will be immediately provisioned to use the PullRequest network if desired with no administrative intervention.

Applying on the Group level

From your GitLab dashboard, select the desired GitLab Group -> Settings -> Webhooks:

Webhook Settings

URL

The base URL of your Proxy with the following:

/webhooks/gitlab

Triggers

SSL verification

OPTIONAL - Add a webhook secret. The secret will be used to sign your webhook requests as they are posted to the proxy:

  • You will need the same webhook secret for all of your repositories if you add one.

  • Update your webhook secret in the PullRequest Proxy UI if you are adding one, otherwise the proxy will not be able to verify/process the webhooks.

Test Connection

Click the Add Webhook button; the webhook should appear in the Webhooks section at the bottom of the page.

Click the Test button to test the connection. You should receive a "Hook executed successfully:" message at the top of the screen.

If you received an error message, double-check the proxy base is valid and /webhooks/gitlab is added as a path.

The PullRequest Proxy repositories table has a LAST WEBHOOK RECEIVED column which will update once you start getting webhooks from GitLab for the project.

The Test connection hook, used to test the connection in GitLab earlier, isn't counted.

Applying on the Project level

From the PullRequest Proxy home screen, click the Repositories tab in the left sidebar. You should see a list of all of the repositories (GitLab Projects) the PullRequest posting user has appropriate access to.

Click on a repository's Configure button. This will open a GitLab configuration page to create a webhook for the selected project.

Webhook Settings

URL

The base URL of your Proxy with the following:

/webhooks/gitlab

Triggers

SSL verification

OPTIONAL - Add a webhook secret. The secret will be used to sign your webhook requests as they are posted to the proxy:

  • You will need the same webhook secret for all of your repositories if you add one.

  • Update your webhook secret in the PullRequest Proxy UI if you are adding one, otherwise the proxy will not be able to verify/process the webhooks.

Test Connection

Click the Add Webhook button; the webhook should appear in the Webhooks section at the bottom of the page.

Click the Test button to test the connection. This will expand a list of trigger types.

Select Merge request events from the list.

You should receive a "Hook executed successfully:" message at the top of the screen.

If you received an error message, double-check the proxy base is valid and /webhooks/gitlab is added as a path.

Repeat these steps for any other GitLab Projects listed in PullRequest that have not been configured.

The PullRequest Proxy repositories table has a LAST WEBHOOK RECEIVED column which will update once you start getting webhooks from GitLab for the project.

The Test connection hook, used to test the connection in GitLab earlier, isn't counted.

Last updated