What is a quality gate

A quality gate is the best way to enforce a quality policy in your organization. Setting up a quality gate allows you to prevent any code that doesn't pass code reviews, from being merged into certain branches.

Key Benefits

  • Enforce code quality consistency accros the entire project
  • Ensure that new committed code doesn't introduce problems
  • Ensure issues are addressed before being merge

Before to start

Before proceed on creating a quality gate in your VCS for your repo, you must enable the Clayton Automation and create a dedicate Clayton connection user for your project.

Enable Automation

Make sure to activate the Clayton Automation to monitor your code and start using webhooks to publish status updates for the PR and branch reviews on your VCS.
Please have a look at the dedicated Help Article to learn how to enable automation.


In your repository settings in GitLab, go under Settings  > General.

  1. [Optional] If you want to specify the author of your status updates in GitLab, you can set up a dedicated connection user for Clayton (ref. here)
  2. Expand the Merge request approvals section
  3. Add your Clayton connection user to the Approvers (learn how to set up a cennection user with Clayton here)
  4. Make sure the Approvals required field is set at least to 1
  5. Click on Save changes

Did this answer your question?