Skip to content

Merge gates

Every fix waits until its reviews pass.

Merge gates review the fix pull requests they are turned on for, and a required gate must approve before merge. Security Review and Code Review are built in, and your owner can add up to 10 of your own.

A drawing of a sample fix pull request, marked ready for review: pull request #418, Refund at most the captured amount, from kelrova/fix-refund-amount into main, +3 −1 in src/routes/refunds.ts, fixing the Critical finding Refund endpoint trusts the client's amount. Its merge gates, 2 gates passed: Security Review, required, approved; Code Review, advisory, approved. The remediation steps Patch, PR, Gates are done, and the Merge pull request button is open.

Both gates are turned on for security fixes here. Pull requests from Fix it now skip every gate by default.A sample fix pull request

The decision rule

The decision is a rule, not an opinion.

Critical and High reject the change. Medium and Low are shown and never block.

A drawing of three gates with their own instructions, Security Review (Refunds and payouts matter most in this project.), Code Review (none added), a sample custom gate called API conventions (Check that new routes follow our API conventions.), all deciding by the same rule. A fixed line with a lock separates Critical and High, which reject the change, from Medium and Low, which are shown and never block.

The line does not move. No gate's text can change it.

A gate's instructions set what it looks at. They never set the rule.

  • Built-in and custom gates alikeInstructions change what a gate looks at, never which severities reject.
  • Advisory gates block nothingThey show their findings, whatever the severity.
  • Required gates hold the mergeA Critical or High finding from one keeps the pull request from merging.

On a fix pull request

Each new version goes round again until the gates approve.

A rejection from a required gate becomes the next fix round on the same pull request. Kelrova runs up to 2 rounds on its own.

  1. Step 1

    A fix opens or updates a pull request

    Every new version is reviewed again by each gate that is on. Results for older versions are replaced.

    Fix roundManual pushBranch update

  2. Step 2

    Each gate reviews the change

    A drawing of one round's reviews: Security Review rejects the change for a High finding, and Code Review approves.

    Every required gate approves: merge opensA required gate rejects: back to the fix
  3. Step 3

    A rejection goes back to the fix

    The required gate's findings become the next fix round on the same pull request.

    Round 1 of 2The new version goes back to step 1

    After 2 automatic rounds, reply to the fix yourself or override the gates.

  4. When every required gate approvesStep 4

    Merge opens

    Once every required gate has approved the latest version, mark the draft ready for review and merge it from Kelrova.

    A drawing of the Merge pull request button, open because the required gates approved.

Advisory gates never send a fix round. Only a required gate's findings go back to the fix; an advisory gate's findings are shown on the pull request.

Gates and settings

Two gates built in, up to ten of your own.

The owner can add instructions to a built-in gate or create custom gates with their own focus. Each gate has four settings.

Organization → Merge Gates

A drawing of the Merge Gates list: Security Review, built-in, required and selected; Code Review, built-in, advisory; a sample custom gate called API conventions, created turned off; and a row to add a new gate. A bar shows 1 of 10 custom gates in use.

Up to 10 custom gates. A new custom gate is created turned off, so nothing changes until you turn it on. Custom gates never stand in for Security Review: keep it on if you want security checked.

Where a member meets them

A drawing of the Fix it now sheet's Required merge gates list with Security Review checked, and its note: Checked gates run before the pull request can merge.

The sheet lists them before the fix starts. It can also say that no merge gates are required for this fix.

One gate's settings

Enabled
The gate reviews every fix pull request. Turned off, it never runs.
Required or Advisory
A required gate must approve before merge and sends rejections back to the fix. An advisory gate shows its findings and blocks nothing.
Can be skipped per fix
Members with Override merge gates may leave the gate out when starting a fix. Turn it off to make the gate unskippable.
Review security fixes
Pull requests from Fix it now skip every gate by default, which saves credits. Turn this on for the gates that should review them too.

A drawing of Security Review's settings: Enabled on, Required selected, Can be skipped per fix off, Review security fixes on.

Pull requests from Fix it now skip every gate by default.That saves credits. Turn on Review security fixes for each gate that should review them too.

Overrides

Merging anyway leaves a reason on the record.

Members with the Override merge gates permission can merge anyway by writing a reason of at least 10 characters. The override is recorded in your organization's audit log.

A drawing of an override: the Merge anyway form with a reason of at least 10 characters written in it, and the record it leaves on pull request #418: the action, the permission and the reason.

Who sets the gates

Everyone sees the gates; the owner changes them.

Gates are set for the whole organization in one place.

  • Everyone in the organizationSees every gate and its settings.
  • The ownerChanges gates, adds instructions and creates custom gates.
  • Members withOverride merge gatesMerge anyway with a reason, and leave out a gate that can be skipped when starting a fix. The permission also needs Manage pull requests.

Good to know

What reviews cost, and when they run again.

Four things to know before you turn a gate on.

Reviews use credits

Each review uses credits and waits in your organization's queue like any other job.

Technical failures retry free

A review that fails for a technical reason can be retried for free.

New instructions re-run the gate

Changing a gate's instructions re-runs it on open pull requests and spends credits.

Skipped gates stay visible

A gate left out when starting a fix is recorded on the fix and shown on its pull request.

Merge gates in the docsEvery setting, the steps on a fix pull request, and overrides./docs/findings/merge-gates

Turn on the gates your fixes should pass.

Merge gates are on every plan, from $20 a month, flat, with no seat fees.

Back to Go Fix