Skip to content

Commit Workflow

Automatic code quality analysis for every commit to GitHub and Bitbucket repositories. Changed files are scanned instantly and commit status is updated in real-time.

Prerequisites

Before enabling commit analysis, ensure you meet all requirements:

Requirements Check

  • Repository linked with initial full scan completed
  • Version Control Account configured with proper token permissions
  • Network access from BrowserStack Code Quality server to your SCM

** Verify Token Permissions →**

Enabling Commit Analysis

Option 1: During Repository Linking

  1. Navigate to Projects → [Your Project] → Link Repository
  2. Select your Version Control Account from the dropdown
  3. Choose your repository from the auto-populated list
  4. Enable "Commit Analysis"
  5. Click Link Repository

Option 2: For Existing Repositories

  1. Go to Repositories → [Your Repository] → Edit
  2. Enable "Commit Analysis"
  3. Click Save

NOTE

Automatic Webhooks: If your VCA has webhook permissions, webhooks are created automatically. Otherwise, configure webhooks manually in your SCM platform.

How It Works

Automated Flow

  1. Developer commits changes to GitHub/Bitbucket
  2. Webhook triggers instant scan of changed files (delta analysis)
  3. Analysis completes and commit status is updated
  4. Results available in both SCM and BrowserStack Code Quality UI

Reviewing Commit Results

In Your SCM (GitHub/Bitbucket):

  • Commit status shows pass/fail with issue count
  • Click status badge for detailed BrowserStack Code Quality results

In BrowserStack Code Quality UI:

  1. Open Development History from repository summary
  2. Navigate to Commits tab
  3. Click commit to see detailed analysis
  4. Review new, fixed, and carried-over issues

Commit Status Types

Status BadgeMeaningAction Required
All GoodNo new issues detectedReady to proceed
Issues FixedPrevious issues resolved (e.g., "+1 Fixed")Positive change!
New IssuesQuality issues introducedReview and address
Scan FailedAnalysis could not completeUse "Retry" button

Platform Support

NOTE

Commit-level analysis is currently not supported for Azure DevOps.

Manual Configuration

If automatic webhook setup fails or you have restricted token permissions:

Manual Webhook Setup

For commit analysis, configure webhook in your SCM platform with:

  • Events: Push events only
  • URL: /api/views/repositories/webhooks
  • Content Type: application/json
  • SSL Verification: Enabled (recommended)

Troubleshooting

Common Issues and Solutions

ProblemQuick Solution
Commits not scannedVerify enterprise license and webhook exists
No commit statusCheck token has commit status permissions
Webhook failuresReview token scopes and server accessibility
Missing in Development HistoryEnsure initial full scan is completed
Analysis timeoutsCheck server resources and network connectivity
VCA connection errorsVerify token validity and permissions