# Customizing Quality Gates

Quality Gates return a **Pass** or **Fail** (sometimes referred to as **Go/No-Go** rules) rating for analysis, depending on the selected criteria.

To create a new Quality Gate, follow the steps below:

1. Navigate to your organization's page and select the **Quality Gates** tab.<br>

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FGFo1cCJFSTg9ieDNvwWs%2Fimage.png?alt=media&#x26;token=69ffd5b1-3b3d-4ae9-a21a-0c6c724cedaa" alt=""><figcaption><p>Quality Gates tab</p></figcaption></figure>
2. **Copy** an existing Quality Gate to use as a template or select **Create** to design it from scratch.&#x20;
3. Give it a unique name and select **Save**.<br>

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fi6igB4dGcKV27dGKLU8u%2Fimage.png?alt=media&#x26;token=2ac183ea-03c3-4299-9369-0d8c02914967" alt="" width="375"><figcaption><p>Create Quality Gate</p></figcaption></figure>
4. To add desired conditions with their Warning and Error thresholds, click on **Add Condition**.&#x20;

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FGIa3aRANQFyQdJYKvVUG%2FQG%20Add%20Condition%209.9.png?alt=media&#x26;token=3ef61190-950c-43cc-8572-46750a5b94e3" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Note: To customize a Quality Gate that is already in use, click on **Unlock editing** first, as shown below.
{% endhint %}

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FEGxbb4ifhBphsgXcuFe0%2FQG%20Unlock%20edit%2010.0.png?alt=media&#x26;token=0dbf8c2e-7e16-4255-9277-8e1cc8ff79a3" alt=""><figcaption></figcaption></figure>

5. Conditions on **New Code** and **Old Code** must be added separately.<br>

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FF1yttXYH2rd58Nvw4uug%2FQG%20Condition%2010.1.png?alt=media&#x26;token=d0b6fac2-ef7d-4dda-a215-97b46f2e78f2" alt="" width="375"><figcaption></figcaption></figure>
6. To assign Quality Gates to specific projects, use the **Project Settings > Quality Gates** menu for your project and select the one you would like to use.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FXwc4kASK224DfTBuWLqg%2FQGate%209.8.png?alt=media&#x26;token=a4ddcca7-5d8b-4c88-b635-eecff97ecf12" alt="" width="563"><figcaption></figcaption></figure>

7. A default **Quality Gate** can be set at the org level. Select **Set as Default.**

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fr0dykf8hFudHW4l9SxTh%2FQG%20Default%2010.2.png?alt=media&#x26;token=e9eaaa6e-028d-4918-923c-b15ae331486f" alt=""><figcaption></figcaption></figure>

Then it will be assigned automatically to every new project, except those for which you specify a different gate. (See step 6.)

{% hint style="info" %}
**NOTE:** BUILT-IN Quality Gates are standard and can’t be edited. But you can always **Copy** and customize as needed. (See step 2.)
{% endhint %}

{% hint style="info" %}
**NOTE**: Changing the severity to '**Info**' will not block the Quality Gates.
{% endhint %}
