CUSTOM PRE-MERGE CHECKS
Mandate specific automated checks before any code can be merged.
Ensure repository health by implementing strict pre-merge gates. GitRabbit Custom Checks allow you to prevent merge actions on code branches that do not meet organizational standards (e.g. minimum test coverage, zero high-priority SAST security alerts, or pending reviewer sign-offs).
Key_Capabilities
Hard Merge Blocks
Locks the merge button in GitHub/GitLab until all verification rules are resolved.
Test Coverage Gates
Require a minimum percentage of test coverage on any new code additions.
Security Assertions
Block merges instantly if vulnerability scanners detect API secret leaks.
Setup_Sequence
Open Settings Panel
Access the settings console on GitRabbit and go to 'Checks & Restrictions'.
Configure Policies
Choose rules like 'Require zero security alerts' or 'Minimum 80% test coverage'.
Enforce Check Status
Save the rules to enable GitRabbit check statuses as a required branch validation in GitHub or GitLab.
Code_Example
Status: ❌ GitRabbit Checks Failed Details: - [FAILED] Required Test Coverage: 74% (Required: 80%) - [PASSED] Zero High Security Alerts - [FAILED] Missing review sign-off from: QA-Lead-Team (This PR cannot be merged until these statuses are resolved.)
Pro_Tips
- ✦Set up an exclusion list for documentation changes (.md) to prevent coverage checks from blocking docs updates.
- ✦Enable administrator overrides for situations requiring hotfixes.