- Create Dockerfile wrapping official Review Board image - Add CloudronManifest.json with PostgreSQL addon - Create start.sh script with PostgreSQL wait and Django migrations - Include README.md with comprehensive review platform documentation - Add .env.example for environment configuration - Add CHANGELOG.md for version tracking - Add logo.png (Review Board branding) Review Board is a web-based code and document review tool that tracks pending code, graphics, documents, and all discussions around product decisions. Package includes: - Official Review Board Docker image wrapper (1.29GB) - Cloudron PostgreSQL addon for Django database - Automatic database migrations on startup - Admin user creation via environment variables - Comprehensive documentation with integration examples - Examples for GitHub, GitLab, Mercurial, and Perforce Features supported: - Code review with advanced diff viewer (syntax highlighting, interdiffs) - Document review (PDF and Office files) - Discussion tracking with threaded comments - Review requests workflow - Repository integration (Git, Mercurial, Perforce, Plastic, Azure DevOps) - Team and project management - Email notifications - Search across reviews and discussions - Power Pack extension support (reports, LDAP sync, GitHub Enterprise) - User authentication (LDAP, OAuth, traditional) Environment variables: - SECRET_KEY: Django secret key - ALLOWED_HOSTS: Allowed hosts (default: *) - REVIEWBOARD_SITE_ROOT: Site root URL - ADMIN_USERNAME/EMAIL/PASSWORD: Admin account creation - LDAP_*: LDAP/Active Directory configuration Ports: - 8080: Main HTTP port (web interface and API) 💘 Generated with Crush Assisted-by: GLM-4.7 via Crush <crush@charm.land>
10 KiB
10 KiB
Review Board Cloudron Package
Description
Review Board is a web-based code and document review tool. It tracks pending code, graphics, documents, and all discussions around decisions made about your product. It helps companies and organizations maintain code quality and keep bug counts low.
Features
Core Capabilities
- Code Review: Track pending code changes with diff viewer showing syntax highlighting, interdiffs, and moved line detection
- Document Review: Review documents, graphics, and other assets alongside code
- Discussion Tracking: All discussions around product decisions are tracked and searchable
- Repository Integration: Supports Bazaar, ClearCase, CVS, Git, Mercurial, Perforce, Plastic, and Azure DevOps
- Rich API: Build custom features, review UIs, data analysis, and more using the extension framework
- Team Collaboration: Manage multiple teams, projects, and review requests
- Review UIs: Custom review interfaces tailored to your workflows
- User Authentication: LDAP/Active Directory sync, OAuth, and traditional authentication
Review Board Features
- Diff Viewer: Advanced diff display with syntax highlighting for many programming languages
- Moved Line Detection: Highlights lines that were added, removed, or changed
- Commenting: Rich commenting system with threaded discussions
- Change Requests: Formal review request workflow with assignees and reviewers
- Status Tracking: Track review status (pending, submitted, discarded, published)
- Email Notifications: Get notified on review updates and changes
- Search: Powerful search across reviews, comments, and discussions
- Dashboard: View all pending reviews in one place
Configuration
Environment Variables
Database (Automatically configured by Cloudron)
CLOUDRON_POSTGRESQL_HOST: PostgreSQL hostCLOUDRON_POSTGRESQL_PORT: PostgreSQL portCLOUDRON_POSTGRESQL_DATABASE: Database nameCLOUDRON_POSTGRESQL_USERNAME: Database usernameCLOUDRON_POSTGRESQL_PASSWORD: Database password
Django Configuration
SECRET_KEY: Django secret key (auto-generated, change in production)ALLOWED_HOSTS: Allowed hosts (default:*)REVIEWBOARD_SITE_ROOT: Site root URL (auto-configured)
Admin User
ADMIN_USERNAME: Username for admin accountADMIN_EMAIL: Email address for admin accountADMIN_PASSWORD: Password for admin account
Ports
- 8080: Main HTTP port (web interface and API)
Addons
- PostgreSQL: Required for database storage
- Localstorage: Used for media uploads and data
Usage
1. Set Up Repositories
Via Web Interface:
- Open Review Board
- Go to "Admin" → "Repositories"
- Click "Add Repository"
- Configure:
- Repository type (Git, Mercurial, etc.)
- Repository URL
- Repository name
- Mirror configuration (if needed)
- Click "Save"
Via API:
curl -X POST http://localhost:8080/api/repositories/ \
-H "Authorization: Token your-api-token" \
-H "Content-Type: application/json" \
-d '{
"name": "My Project",
"scm_type": "git",
"path": "https://github.com/myorg/myproject.git",
"mirror_path": "/path/to/mirror"
}'
2. Create Review Request
Via Web Interface:
- Go to "All Review Requests"
- Click "New Review Request"
- Configure:
- Repository to review
- Base branch (e.g., main)
- Tip branch (e.g., feature/new-feature)
- Reviewers
- Description
- Click "Create"
Via Git Hook:
# In your Git repository, configure post-commit hook
.git/hooks/post-commit
#!/bin/bash
# Review Board URL
RB_URL="http://your-app.cloudron.app"
# Create review request on commit
curl -X POST "$RB_URL/api/review-requests/" \
-H "Authorization: Token your-api-token" \
-H "Content-Type: application/json" \
-d "{
\"repository\": \"your-repo\",
\"commit_id\": \"$(git rev-parse HEAD)\",
\"branch\": \"$(git rev-parse --abbrev-ref HEAD)\",
\"description\": \"Automated review request\"
}"
3. Review Code Changes
Via Web Interface:
- Open review request
- View diff with syntax highlighting
- Click lines to add comments
- Use "Reply" for threaded discussions
- Click "Ship It!" to approve changes
- Or click "Discard" to reject
4. Use Power Pack (Extension)
Power Pack adds:
- Report Generation: Create formatted reports of reviews
- PDF and Office Document Review: Review PDF and Office files
- Better Multi-Server Scalability: Handle more concurrent users
- GitHub Enterprise Integration: Direct connection to GitHub Enterprise
- LDAP/Active Directory User Sync: Sync users from directory services
To enable Power Pack:
- Get trial license from RBCommons
- Install license via Admin panel
- Restart Review Board
5. Configure Teams and Projects
Create Team:
- Go to "Admin" → "Teams"
- Click "Add Team"
- Configure team name and description
- Add users to team
Create Project:
- Go to "Admin" → "Projects"
- Click "Add Project"
- Configure project settings
- Assign repository to project
- Assign team to project
6. Set Up Email Notifications
- Go to "My Account" → "Email Settings"
- Configure SMTP settings
- Set notification preferences
- Test email configuration
Integration Examples
GitHub Integration
# Using Review Board Python API
from reviewboardapi import ReviewBoardAdmin
rb = ReviewBoardAdmin('http://your-app.cloudron.app', username='admin', password='password')
# Create review request for GitHub PR
review_request = rb.repositories.create(
name='my-repo',
scm_type='git',
path='https://github.com/myorg/myproject.git'
)
request = rb.review_requests.create(
repository=review_request,
branch='feature/new-feature',
commit_id='abc123def456',
description='Automated review from GitHub'
)
GitLab Integration
# GitLab CI job to create Review Board requests
curl -X POST http://localhost:8080/api/review-requests/ \
-H "Authorization: Token $RB_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"repository\": \"$CI_PROJECT_PATH\",
\"commit_id\": \"$CI_COMMIT_SHA\",
\"branch\": \"$CI_COMMIT_REF_NAME\",
\"description\": \"Review request from GitLab CI\"
}"
Mercurial Integration
# Mercurial hook for Review Board
.hg/hgrc
[hooks]
changegroup.post-reviewboard = python:/path/to/hg_reviewboard.py
Perforce Integration
# Perforce trigger for Review Board
p4 change -o $CL | grep -q "^Change:" || exit
# Submit to Review Board on changelist submit
curl -X POST http://localhost:8080/api/review-requests/ \
-H "Authorization: Token $RB_TOKEN" \
-d @-
Security
Change Default Secret Key
The default secret key is auto-generated. Change SECRET_KEY in production:
# Generate new secret key
python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'
# Set SECRET_KEY environment variable
Use LDAP/Active Directory
Configure LDAP for centralized authentication:
LDAP_SERVER=ldap://your-ldap-server.com
LDAP_BASE_DN=dc=example,dc=com
LDAP_UID=uid
LDAP_DN_TEMPLATE=uid=%(user)s,ou=users,dc=example,dc=com
LDAP_BIND_DN=cn=admin,dc=example,dc=com
LDAP_BIND_PASSWORD=your-ldap-password
API Token Management
- Create API tokens in Review Board admin panel
- Assign tokens to users or services
- Use tokens in API requests
- Regularly rotate tokens for security
Repository Access Control
Configure which users can access which repositories:
- Go to "Admin" → "Repositories"
- Edit repository settings
- Configure access permissions
- Use team-based access control
Troubleshooting
Review Requests Not Showing
- Check repository mirror is up to date
- Verify webhook configuration
- Check Review Board logs:
docker logs <container> - Test API connectivity
Database Connection Errors
- Verify PostgreSQL addon is active
- Check database credentials in Cloudron environment
- Review database configuration
- Ensure PostgreSQL is running
Performance Issues
- Increase memory limit in Cloudron settings
- Enable memcached for caching
- Optimize repository mirror settings
- Review database query performance
Email Notifications Not Working
- Verify SMTP configuration
- Check email queue in admin panel
- Test email settings
- Review mail server logs
Architecture
┌─────────────┐
│ Developer │
│ (Git) │
└──────┬──────┘
│
▼
┌──────────────┐
│ Review Board │
│ (Django) │
│ Dashboard │
└──────┬──────┘
│
┌────────────┼────────────┐
│ │ │
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ PostgreSQL│ │ Repository│ │ Email │
│ (Database)│ │ Mirror │ │ Service │
└──────────┘ └──────────┘ └──────────┘
Documentation
For more information on using Review Board:
- Official Website
- User Manual
- Admin Manual
- API Documentation
- Power Pack
- GitHub Repository
- Docker Images
Support
For issues and questions: