Enabling block merge
Only organization admins can configure these settings. Configure finding-based blocks in Settings -> Configuration -> Approvals:- Select Organization defaults or a repository in the scope picker.
- Set Behavior under Block merges to the lowest severity that should block a merge.
After each review, Gitar compares the verdict with this threshold. When findings fall below the threshold, Gitar releases its block. Other merge requirements still apply.
Require Gitar before merging
Follow the instructions for the code host to require Gitar to finish processing before merging. Finding-based blocking remains a separate setting.GitHub: require the Gitar check
GitHub: require the Gitar check
Require the Gitar status check in a GitHub branch ruleset:
- Run Gitar on a PR so the check appears in the repository.
- Open Settings -> Rules -> Rulesets and create or edit a ruleset for the target branches.
- Enable Require status checks to pass.
- Add Gitar as a required check and select the Gitar GitHub App as its expected source.
- Set enforcement to Active and save the ruleset.
GitLab: hold merges while reviewing pushes
GitLab: hold merges while reviewing pushes
GitLab must enforce MR approval rules, generally on Premium or Ultimate. Auto-Approve is not required.
- Open Settings -> Configuration -> Approvals and select the organization or repository scope.
- Under Block merges, set Behavior to the lowest finding severity that should block merging.
- Enable Hold GitLab merges while reviewing pushes under Block merges.
pending and does not check the reviewed commit, so it does not require a review of the MR’s current commit.
Gitar does not integrate with GitLab’s external status checks API. Enabling Status checks must succeed alone does not make an MR wait for Gitar.
Platform behavior
Each host enforces finding-based blocks differently. See Platform support for the capability matrix.GitHub
GitHub
Gitar submits a request-changes review. Branch protection or rulesets must enforce that review for it to block merging.Gitar dismisses its review when the block clears. Repository admins can also dismiss it through GitHub. Gitar respects that override for the current review cycle.
GitLab
GitLab
Gitar uses an MR-level approval rule named Gitar and posts a blocking comment. When GitLab does not enforce approval rules, Gitar leaves findings in the review summary and does not claim a merge block.Gitar removes its own rule when the block clears. Submitting an approval is controlled separately by Auto-Approve.
Azure DevOps
Azure DevOps
Gitar casts a reject vote. To enforce it, make the connected Gitar account a required reviewer or configure a blocking reviewer policy that does not allow completion with reject votes. A reject vote alone does not guarantee a merge block. See Microsoft’s branch policy documentation.
Bitbucket
Bitbucket
Gitar records a request-changes status on Cloud and a needs-work status on Data Center. Gitar does not configure or verify repository merge checks. Whether these statuses prevent merging depends on the repository’s merge checks.
AWS CodeCommit preview
AWS CodeCommit preview
Gitar adds a native approval rule while blocking findings remain. When the review clears or an authorized user runs
gitar unblock, Gitar removes its own rule. Existing customer approval rules remain in place.Overriding a block
An override releases Gitar’s block while leaving the code host’s other merge requirements in place. For finding-based blocks, a push alone does not cancel a recorded override. Once a later review clears the configured blocking threshold, Gitar can block again if subsequent findings meet it.
Once an admin enables
gitar unblock, members can use it without organization admin access. Each successful unblock is logged in a PR comment. The command is unavailable on Bitbucket Data Center.