Skip to main content

Get GitLab notifications

Astrolabe tells you about GitLab in the bell at the top right: a pipeline that fails, a merge request that needs a review. You choose which events.

Before you start​

Your administrator has set up the GitLab webhook (see below).

πŸ”” Choose your GitLab events​

  1. At the top right, click your avatar, then My Account.

  2. Open the Notifications tab.

  3. In the What do you want to receive? card, find the GitLab section. Each event has two switches: In Astrolabe (the bell) and On this browser.

    Event
    When a pipeline failsMarked Critical
    When a MR is opened
    When a MR is closed
    When a MR is edited
    When a MR review is requested
    When a MR is approved
    When changes are requested on a MR
    When a MR is reviewed with comments
    When a pipeline is cancelled
    When a to-do is added to your GitLab to-do list
  4. Switch an event off or on. It is saved right away.

Pipeline starts and successes are under Starts and successes, at the bottom of the GitLab section: When a pipeline starts and When a pipeline completes successfully. They are off.

A pipeline that fails reaches you as, for example, Pipeline failed for shop-api (main), with acme/shop-api #9 - By jdoe under it.

To be told about every pipeline of a component, see Watch a component. For the browser column, see Choose your notifications.

βœ… That's it!

πŸ”• Stop the successes of the components you watch​

You watch a component? Everything that happens to it reaches you, successes included: the Watched components section of the same card is on by default.

  1. In the Watched components section, click Starts and successes.

  2. On the line GitLab β€” When a pipeline completes successfully, switch In Astrolabe off.

The failures keep reaching you: GitLab β€” When a pipeline fails stays on.

βœ… That's it!

πŸ”— For the administrator: set up the webhook​

GitLab sends its events to Astrolabe through a webhook.

  1. In the left sidebar, at the bottom, click Administration.

  2. Under PLATFORM, click Company connections, then open the Webhooks tab.

  3. On the GitLab card, click Configure.

  4. In the window, next to Webhook URL, click Copy address. The button says Copied.

  5. In Webhook Secret, type a secret of your choice, then click Save Secret.

  6. In your GitLab project, add a webhook: paste the address as its URL, and the same secret as its token. This step was not checked on a live instance.

Each time GitLab calls Astrolabe with the right secret, the GitLab card of the Webhooks tab says Last call accepted with the date, and its button reads Manage.