How reviewboard/reviewbot works
Review Bot is a Review Board extension plus Celery workers that run configurable code-checking tools and publish findings as reviews. The main flow starts with an integration-triggered status update, queues a worker task, fetches review data and repository context, executes a selected tool, and publishes comments. The README documents broad tool and plugin capabilities; source excerpts support key worker and extension links, while several subsystem details are represented at directory level because their implementation was not sampled.
Main entry points: tasks.py Run tool task · integration.py Integration dispatch · repositories.py Repository access · tool.py Tool execution API
Components 21
Review Board Extension
- Integration dispatch
extension/reviewbotext/integration.py - Extension setup
extension/reviewbotext/extension.py - Integration configuration
extension/reviewbotext/forms.py - Tool API resource
extension/reviewbotext/resources.py - Review API resource
extension/reviewbotext/resources.py - Tool models
extension/reviewbotext/models.py
Worker Runtime
- Task queue setup
bot/reviewbot/celery.py - Run tool task
bot/reviewbot/tasks.py
Review Processing
- Review and diff data
bot/reviewbot/processing/review.py - Repository access
bot/reviewbot/repositories.py - Review publication
extension/reviewbotext/resources.py
Analysis Tools
- Tool registry
bot/reviewbot/tools/base/registry.py - Tool execution API
bot/reviewbot/tools/base/tool.py - Tool implementations
bot/reviewbot/tools
Worker Support
- Worker configuration
bot/reviewbot/config.py - Review Board API client
bot/reviewbot/utils/api.py - File and patch handling
bot/reviewbot/utils/filesystem.py - Process execution
bot/reviewbot/utils/process.py - Worker logging
bot/reviewbot/utils/log.py
Other components
- Review participants
- Review Board
Connections 27
- Review participants → Review Board: submits changes
- Review Board → Integration dispatch: configures tools
- Integration dispatch → Integration configuration: uses settings
extension/reviewbotext/integration.py - Integration dispatch → Tool models: loads tool
extension/reviewbotext/integration.py - Integration dispatch → Task queue setup: queues task
extension/reviewbotext/integration.py - Extension setup → Integration dispatch: registers hook
extension/reviewbotext/extension.py - Extension setup → Task queue setup: configures broker
extension/reviewbotext/extension.py - Review Board → Tool API resource: requests tool list
- Tool API resource → Tool registry: refreshes worker tools
- Task queue setup → Run tool task: dispatches task
bot/reviewbot/celery.py - Run tool task → Review Board API client: connects API
bot/reviewbot/tasks.py - Run tool task → Tool registry: selects tool
bot/reviewbot/tasks.py - Run tool task → Review and diff data: loads review
bot/reviewbot/tasks.py - Run tool task → Repository access: loads repository
bot/reviewbot/tasks.py - Run tool task → Tool execution API: executes tool
- Tool registry → Tool implementations: registers implementations
- Tool implementations → Tool execution API: uses execution API
bot/reviewbot/tools/base/__init__.py - Tool execution API → Process execution: runs commands
bot/reviewbot/tools/base/tool.py - Tool execution API → Worker configuration: reads settings
bot/reviewbot/tools/base/tool.py - Review and diff data → File and patch handling: creates patch files
bot/reviewbot/processing/review.py - Repository access → Worker configuration: reads configuration
bot/reviewbot/repositories.py - Repository access → Review Board API client: uses API client
bot/reviewbot/repositories.py - Run tool task → Review API resource: publishes review
- Review API resource → Review publication: creates review
extension/reviewbotext/resources.py - Review publication → Review Board: posts findings
- Repository access → File and patch handling: manages worktree
bot/reviewbot/repositories.py - Run tool task → Worker logging: records task activity
bot/reviewbot/tasks.py