Skip to content

SOP-020: Bugbot Setup

Document Control

  • Version: 1.0
  • Last Updated: 2024
  • Category: Advanced

Purpose

Configure Bugbot to automatically review pull requests and identify bugs, security issues, and code quality problems.


Scope

This SOP covers:

  • Setting up Bugbot for GitHub/GitLab
  • Configuring review rules
  • Managing team settings
  • Understanding pricing tiers

Prerequisites

  • Cursor Team or Individual subscription
  • GitHub/GitLab repository access
  • Admin access for team setup

Procedure

Step 1: Install Bugbot

For GitHub.com:

  1. Go to Cursor Dashboard
  2. Navigate to Integrations tab
  3. Click Connect GitHub (or Manage Connections)
  4. Follow GitHub installation flow
  5. Return to dashboard to enable Bugbot on repositories

For GitLab or GitHub Enterprise:

Contact hi@cursor.com for setup instructions.

Step 2: Enable for Repositories

  1. Go to Cursor Dashboard
  2. Select repositories to enable
  3. Configure settings per repository

Step 3: Configure Review Settings

Team Admin Settings:

SettingDescription
Run only onceSkip subsequent commits
Disable inline reviewsNo code line comments
Allow/deny reviewersControl who gets reviews

Personal Settings:

SettingDescription
Run when mentionedOnly on cursor review
Run only onceSkip follow-up commits
Review draft PRsInclude drafts

Step 4: Create Bugbot Rules

Create .cursor/BUGBOT.md in your repository:

markdown
# Bugbot Review Rules

## Security
- Flag any hardcoded API keys or secrets
- Check for SQL injection vulnerabilities
- Verify input validation on endpoints

## Code Quality
- No TODO comments without linked issues
- Console.log not in production code
- All async functions need error handling

## Testing
- New features require unit tests
- Bug fixes require regression tests

Directory Structure:

project/
  .cursor/BUGBOT.md          # Always included
  backend/
    .cursor/BUGBOT.md        # Included for backend files
  frontend/
    .cursor/BUGBOT.md        # Included for frontend files

Step 5: Add Team Rules (Optional)

Team admins can create organization-wide rules:

  1. Go to Bugbot Dashboard
  2. Add rules that apply to all repos
  3. Choose enforcement level

Rule Priority: Team Rules → Project BUGBOT.md → User Rules


How Bugbot Works

  1. Automatic reviews on every PR update
  2. Manual trigger with cursor review or bugbot run
  3. Uses PR comments for context
  4. Fix in Cursor links for quick fixes
  5. Fix in Web links for cloud fixes

Pricing

Free Tier

  • Limited PR reviews per month per user
  • Pauses when limit reached
  • Resets each billing cycle

Pro Tier

Individuals: $20/month for unlimited reviews

Teams: $40/user/month

  • Per-user billing (users who author reviewed PRs)
  • Seats relinquish at billing cycle start
  • Admin-controlled seat limits
  • 200 PR/month cap per license

Admin API

Enable/disable repos programmatically:

bash
curl -X POST https://api.cursor.com/bugbot/repo/update \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "repoUrl": "https://github.com/your-org/your-repo",
    "enabled": true
  }'

Create API key at Dashboard Settings.


Verification Checklist

  • [ ] GitHub/GitLab connected
  • [ ] Repositories enabled in dashboard
  • [ ] .cursor/BUGBOT.md created with rules
  • [ ] Test PR receives Bugbot review
  • [ ] Team rules configured (if team)

Troubleshooting

IssueSolution
No review appearingRun cursor review verbose=true for logs
Wrong suggestionsUpdate BUGBOT.md rules
Permission errorsCheck GitHub app installation
Free tier exhaustedUpgrade to Pro or wait for next cycle

See Also

Built with VitePress | Powered by Claude AI