Skip to content

Quickstart on GitLab.com

Documentation Index

Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt

Use this file to discover all available pages before exploring further.

Sourcery reviews every merge request on the projects you connect. Set it up in a few minutes: log in with GitLab, pick your projects, and open a merge request to read your first review.

  1. Log in with GitLab

    Go to the Sourcery dashboard and click Log in with GitLab. The first time you log in, Sourcery sends you straight to the namespace picker.

  2. Authorize Sourcery on GitLab.com

    GitLab asks you to authorize Sourcery. Sourcery requests the api, openid, and email scopes in a single OAuth consent. The api scope lets Sourcery read your projects and post reviews; openid and email identify you when you sign in. Approve the prompt to continue.

  3. Pick a namespace

    On the Where do you want to install Sourcery? screen, choose the group or namespace you want reviews on; if you belong to several, start with one and connect the rest later. The list shows the namespaces where you have admin access. If a namespace already has Sourcery, click Configure instead.

  4. Choose projects and install

    Sourcery lists every project in the namespace, selected by default. Choose the ones you want reviewed, then click Install. That’s it for setup: Sourcery adds the @sourcery-ai bot user and a webhook to each selected project, so it sees merge requests and comments as they happen.

Open a merge request on any connected project and Sourcery reviews it. You’ll see:

  • A summary in the merge request description covering the change’s purpose and risk.
  • A reviewer’s guide comment with the code paths that changed and how to verify them.
  • Inline comments on the specific lines they’re about.

Push more commits and Sourcery reviews the new changes. To talk to it, comment @sourcery-ai on the merge request.