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 across the entire project
Ensure that new committed code doesn't introduce problems
Ensure issues are addressed before being merged
Before to start
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.
Dedicated Integration User
Please review our Help Article to learn how to set up a dedicated integration user for Clayton.
Steps
You can get to branch policy settings with the following:
Project Settings > Repository > Policies > Branch Policies > <Branch Name>.
Suggested Setup
Configure the desired number of reviewers that need to approve your PRs
Example: If all your PRs need to be approved by one of your architects, then configure 2 required reviewers:A good practice is also to "Reset all code reviewer votes when new changes are pushed" to ensure the new code gets reviewed and approved.
Configure the Clayton Integration User as "Required Reviewer" to ensure your new code complies with the active Clayton's code review criteria configured on your repository.
Note: Clayton's code review will Pass if:No issues are detected
Or only WARNING issues (aka non-blocking bugs) are detected.
You can read more about our Severity Levels here.