GitLab

Setting up GitLab webhook integration gives you the ability to receive event notifications from GitLab directly in your desired Rocket.Chat room.

These events include and are not limited to:

  • Comments

  • Issues events

  • Merge requests

  • Deployment events

In configuring this integration, make sure your Rocket.Chat is publicly available on a URL.

GitLab Rocket.Chat Integration

To configure the webhook integration between GitLab and Rocket.Chat, you need to:

Follow these steps below to do that

Creating a new GitLab webhook integration

  • On your Rocket.Chat workspace, go to Administration -> Workspace -> Integrations

  • Switch to the Incoming tab and create a New Integration

  • Fill in the details of your webhook including the name of the webhook, the room to post into, the user to post as and enable it

GitLab new incoming Webhook
  • Enable Scripts and paste the following code into the Scripts box

  • Save the settings

  • The Webhook URL and Token are generated after saving

  • Copy these credentials, they will be used later

GitLab webhook url and token

GitLab Webhooks settings

After creating the new incoming webhook integration on Rocket.Chat, it is time to link it up with the GitLab repository.

  • Go to your GitLab project page then navigate to Settings > Webhooks

  • Fill in the URL and token you copied from the Rocket.Chat setting

  • Select the type of events you want to be notified on and Add webhook

GitLab webhook setting
GitLab webhook test

Last updated