Skip to main content

Overview

Gitar can prevent a PR from being merged when its code review finds issues above a severity threshold you configure. The block uses your platform’s native review mechanism, requesting changes on GitHub or unapproving on GitLab, so it works with your existing branch protection rules.

How It Works

1

Code review completes

Gitar reviews the PR as usual, producing a verdict based on the findings.
2

Verdict is evaluated against the threshold

If the verdict meets or exceeds your configured blocking level, Gitar submits a blocking review on the PR.
3

Issues are resolved

As you push fixes and findings are resolved, Gitar re-evaluates the verdict. Once it drops below the threshold, Gitar dismisses its blocking review and the PR can merge.

Enabling Block Merge

  1. Navigate to Settings in the Gitar dashboard
  2. Open the Code Review section
  3. Enable Block merge based on code review
  4. Select your desired blocking level

Platform Behavior

Whether a block is enforced or only recorded differs by host. See Platform Support for the full matrix.
Gitar submits a “request changes” review on the PR. If your branch protection rules require approving reviews or no outstanding change requests, this blocks the merge button.When the block is lifted, Gitar dismisses its review. Repository admins can also dismiss the blocking review manually through GitHub’s UI. Gitar respects that override and does not re-block for the current review cycle.
Gitar adds itself as a reviewer and withholds approval. If your approval rules require Gitar’s approval, the MR cannot merge until the block is lifted.Approval rules have to be enforced on the instance for this to hold a merge. Where they are not, Gitar places no rule and posts no blocking comment - the findings stay in the review summary and the MR can merge.When issues are resolved, Gitar approves the MR to unblock it.
Gitar casts a reject vote on the PR. Azure DevOps treats that as a hard block and refuses to complete the PR while it stands, with no branch policy needed.
On Cloud and Data Center the review is recorded and visible, and Bitbucket does not treat it as a merge gate, so a person can still merge.

Overriding a Block

If you need to merge despite unresolved findings, you have two options:
  • gitar unblock command: comment gitar unblock on the PR to dismiss the blocking review and allow merging.
  • Platform override: dismiss the blocking review through your host’s own UI.