Appearance
Pull Request Workflow
Automatic code quality analysis for every pull request. Changed files are scanned instantly and results appear directly in your PR with inline comments and quality gate status.
Prerequisites
Before enabling pull request analysis, ensure you meet all requirements:
Requirements Check
- Repository linked with initial full scan completed
- Version Control Account configured with proper token permissions
- Supported platforms: GitHub, GitLab, Bitbucket, or Azure DevOps
- All licenses supported (no enterprise requirement)
- Network access from BrowserStack Code Quality server to your SCM
** Verify Token Permissions →**
Enabling Pull Request Analysis
Option 1: During Repository Linking
- Navigate to Projects → [Your Project] → Link Repository
- Select your Version Control Account from the dropdown
- Choose your repository from the auto-populated list
- Enable "Pull Request Analysis"
- Click Link Repository
Option 2: For Existing Repositories
- Go to Repositories → [Your Repository] → Edit
- Enable "Pull Request Analysis"
- 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
- Developer creates PR in your SCM (GitHub/GitLab/Bitbucket/Azure DevOps)
- Webhook triggers instant scan of changed files (delta analysis)
- Analysis completes and results are posted as PR comments
- Quality gate status appears in PR status checks
Reviewing PR Results
In Your SCM (GitHub/GitLab/etc.):
- Quality gate status in PR checks (pass/fail)
- Inline comments highlighting specific issues
- Overall quality summary in PR status
In BrowserStack Code Quality UI:
- Open Development History from repository summary
- Navigate to Pull Requests tab
- Click your PR to see detailed analysis
- Review new issues, fixed issues, and carried-over issues
Quality Gate Configuration
Customize pass/fail thresholds in your repository's Configuration JSON:
- New issues introduced limit
- Code coverage thresholds
- ️ Critical/high severity issue counts
- ️ Technical debt metrics
Platform Support
NOTE
Azure DevOps Users: You must connect via a Version Control Account to enable Pull Request analysis.
Manual Configuration
If automatic webhook setup fails or you have restricted token permissions:
Manual Webhook Setup
For pull request analysis, configure webhook in your SCM platform with:
- Events: Pull request/merge request events
- URL:
/api/views/repositories/webhooks - Content Type:
application/json - SSL Verification: Enabled (recommended)
Troubleshooting
Common Issues and Solutions
| Problem | Quick Solution |
|---|---|
| PRs not scanned | Verify webhook exists and PR analysis enabled |
| No inline comments | Check token has PR comment permissions |
| Quality gate missing | Verify commit status permissions |
| Fork PR issues | Limited support for fork repositories |
| Analysis timeouts | Check server resources and network connectivity |
| VCA connection errors | Verify token validity and permissions |
Related Workflows
- Commit Workflow → – Analysis on every commit (enterprise)
- Gated Commit → – Local quality gates before push
- Token Permissions → – Required scopes for all providers
