Createst Docs

Code Review on GitLab

Connect GitLab (gitlab.com or self-hosted), then enable AI code review and auto-fix on your merge requests.

Createst reviews your GitLab merge requests and can automatically commit fixes back to the source branch. This works on both gitlab.com and self-hosted GitLab.

1. Connect GitLab

Go to Settings → Connections and find the GitLab section. Click Connect GitLab.

Choose where your GitLab lives:

  • gitlab.com — the hosted SaaS.
  • Self-hosted — your own GitLab instance.

Authorize the connection:

  • gitlab.com — click Connect and you'll be sent to gitlab.com to authorize Createst, then brought back. (On the Free tier this uses your OAuth login, which is all that's needed.)
  • Self-hosted — enter your instance URL (e.g. https://gitlab.example.com) and pick an authentication method:
    • Access / service-account token (recommended) — paste a token with the api scope. A Service Account or Group access token is ideal so reviews and fixes are attributed to a bot identity rather than a person.
    • OAuth app — use a per-instance OAuth application if you prefer.

Once connected, a card appears in the GitLab section showing the instance host, the account, and the identity kind (Service account, Group token, Personal token, or OAuth). That's the identity Createst uses to comment on and push to your merge requests.

Token scopes. For code review, an api-scoped token is enough. For auto-fix (which pushes a commit back), the token must also be able to write to the repository — use an api + write_repository token. Read-only deploy tokens cannot push and won't work for auto-fix.

2. Enable review & auto-fix on a project

Link the GitLab repository to a Createst project, then open the project's Code Review settings. The provider badge will read GitLab, confirming the repo is linked.

Turn on AI Code Review. Configure one or more review passes — each pass has its own agent and model. Use multiple passes when you want, for example, a correctness pass and a separate security pass.

(Optional) Turn on Auto-Fix and set the max cycles (how many review → fix → re-review rounds are allowed). Pick the agent and model the fixer should use.

Click Save. Linking the repository also registers the merge-request webhook automatically — no manual webhook setup needed.

3. What happens on a merge request

When you open or update a merge request on the connected repository:

StepWhat Createst does
ReviewRuns each configured pass and posts findings as inline discussion comments on the exact lines, each tagged with a severity and category.
StatusSets a createst/code-review commit status on the MR head so the result appears with your other checks. For multiple passes you'll see createst/code-review-1, -2, and so on.
Auto-fix (if enabled)Commits a fix to the MR's source branch (a commit titled "fix: autofix code review findings"). The push triggers a fresh review.
Re-review & resolveThe re-review runs on the new commit; when a finding is addressed, its review thread is resolved. This repeats until the code is clean or the cycle limit is reached.

Fork merge requests. When the MR comes from a fork Createst can push to, auto-fix commits the fix to the fork's branch as usual. If the bot identity can't write to the contributor's fork, Createst still posts its review findings but skips the commit (comment-only) — so nothing is ever pushed where it shouldn't be.

Tips

  • Use a bot identity. On self-hosted GitLab, a Service Account or Group access token keeps reviews and fix commits attributed to a bot rather than a teammate. On gitlab.com Free, the OAuth connection is used.
  • Start with review-only. Enable review first, watch a couple of MRs, then turn on auto-fix once you're happy with the findings.
  • Multiple instances are fine. You can connect gitlab.com and one or more self-hosted instances at the same time; each shows as its own connection.

On this page