GitHub App
The MergeGuide GitHub App automatically checks pull requests against your policies.SCM Platform Support
MergeGuide supports 4 SCM platforms natively. The GitHub App is one of four PR gate integrations:| SCM | Integration Type | PR Gate | Inline Comments |
|---|---|---|---|
| GitHub | GitHub App | Yes | Yes |
| GitLab | Webhook + OAuth | Yes | Yes |
| Bitbucket | OAuth App | Yes | Yes |
| Azure DevOps | Azure DevOps App | Yes | Yes |
Features
- Automatic PR Checks - Every PR is analyzed against your policies
- Status Checks - Pass/fail status on PRs
- Inline Comments - Violations annotated directly in PR diff
- Check Runs - Detailed results in GitHub Checks tab
- Branch Protection - Require MergeGuide checks to pass before merge
Installation
- Visit github.com/apps/mergeguide
- Click Install
- Select repositories to enable
- Authorize the app
- Go to portal.mergeguide.ai
- Navigate to Settings > Integrations
- Click Connect GitHub
Permissions
The GitHub App requires these permissions:| Permission | Purpose |
|---|---|
| Read repository contents | Analyze code changes |
| Read pull requests | Access PR metadata |
| Write checks | Report check results |
| Write pull request comments | Post inline comments |
| Read organization members | Verify organization access |
How It Works
- Developer opens a pull request
- MergeGuide receives webhook notification
- Changed files are analyzed against policies
- Results are posted as:
- Check run (pass/fail status)
- PR review comments (inline annotations)
- Summary comment (overall results)
Configuration
Repository Settings
Create.mergeguide.yaml in your repository:
Organization Settings
Configure defaults for all repositories in your MergeGuide dashboard:- Go to Settings > GitHub Integration
- Set default policies for new repositories
- Configure notification preferences
Check Results
Status Check
The status check appears in the PR:- Pending - Analysis in progress
- Success - All policies passed
- Failure - Policy violations found
- Error - Analysis failed (configuration issue)
Inline Comments
Violations appear as review comments:Summary Comment
A summary is posted with:- Total files analyzed
- Policies checked
- Violations by severity
- Link to full report
Branch Protection
To require MergeGuide checks:- Go to repository Settings > Branches
- Edit branch protection rule
- Enable “Require status checks to pass”
- Search for and select “MergeGuide”
Re-running Checks
Checks automatically re-run when:- New commits are pushed to the PR
- PR is synchronized with base branch
- Go to the Checks tab
- Click Re-run on MergeGuide check
Ignoring Files
Exclude files from GitHub checks:Troubleshooting
Checks Not Running
- Verify app is installed on repository
- Check
.mergeguide.yamlis valid - Ensure webhook delivery is successful (repo Settings > Webhooks)
Checks Stuck Pending
- Check MergeGuide status page
- Re-push a commit to trigger new check
- Contact support if persists
Too Many Comments
Limit inline comments:Rate Limiting
If hitting GitHub rate limits:Webhook Events
The app listens for:| Event | Trigger |
|---|---|
pull_request.opened | New PR created |
pull_request.synchronize | PR updated with new commits |
pull_request.reopened | Closed PR reopened |
check_run.rerequested | Manual re-run requested |
issue_comment.created | /mergeguide command |
Security
- Code is analyzed but never stored
- Webhook payloads are verified
- API tokens are scoped per-installation
- All communication uses HTTPS
Uninstalling
- Go to GitHub Settings > Applications
- Find MergeGuide
- Click Configure
- Click Uninstall