Skip to content

Add Review Helper API service#5684

Merged
suhaibmujahid merged 14 commits intomozilla:masterfrom
suhaibmujahid:reviewhelper-api
Feb 18, 2026
Merged

Add Review Helper API service#5684
suhaibmujahid merged 14 commits intomozilla:masterfrom
suhaibmujahid:reviewhelper-api

Conversation

@suhaibmujahid
Copy link
Member

Add a new FastAPI backend (reviewhelper-api) implementing the Review Helper service.

Add a new FastAPI backend (reviewhelper-api) implementing the Review Helper service.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a comprehensive FastAPI backend service called reviewhelper-api that implements Mozilla's Review Helper service. The service processes code review requests from Phabricator (with future GitHub support), generates automated review comments using AI tools from the bugbug library, and manages feedback on those comments. The architecture uses Google Cloud infrastructure including Cloud SQL for PostgreSQL, Cloud Tasks for asynchronous processing, and is designed for deployment on Cloud Run.

Changes:

  • New FastAPI application with database models, API routers, and async task processing
  • Database schema with Alembic migrations supporting review requests, generated comments, and user feedback
  • Integration with Google Cloud services (Cloud SQL, Cloud Tasks) and Phabricator API
  • Docker containerization with multi-stage build for Cloud Run deployment

Reviewed changes

Copilot reviewed 26 out of 31 changed files in this pull request and generated 29 comments.

Show a summary per file
File Description
pyproject.toml Project dependencies including FastAPI, SQLAlchemy, Cloud integrations, and bugbug tool
app/main.py FastAPI application setup with lifespan management and health check endpoint
app/config.py Pydantic settings for configuration management from environment variables
app/auth.py Bearer token authentication for external and internal API endpoints
app/enums.py Enum definitions for platforms, review statuses, feedback types, and user roles
app/database/models.py SQLAlchemy async models for review requests, comments, and feedback
app/database/connection.py Cloud SQL connection setup using Cloud SQL Python Connector
app/routers/request.py Endpoint for submitting and checking review requests
app/routers/feedback.py Endpoint for submitting user feedback on generated comments
app/routers/internal.py Internal endpoint for Cloud Tasks to process review requests
app/tasks.py Cloud Tasks integration for asynchronous review processing
app/review_processor.py Core logic for processing reviews and submitting comments to platforms
app/schemas/*.py Pydantic schemas for request/response validation
alembic/ Database migration configuration and initial schema
Dockerfile Multi-stage Docker build for production deployment
README.md Setup instructions and Cloud SQL configuration documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@suhaibmujahid suhaibmujahid marked this pull request as ready for review February 18, 2026 05:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 31 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

marco-c
marco-c previously approved these changes Feb 18, 2026
Copy link
Collaborator

@marco-c marco-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only had a cursory look because it's too much new code, but it LGTM overall.

@suhaibmujahid suhaibmujahid merged commit 0c2a1af into mozilla:master Feb 18, 2026
0 of 6 checks passed
@suhaibmujahid suhaibmujahid deleted the reviewhelper-api branch February 18, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments