Code Reviewer and Review Checker#1427
Conversation
Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com>
Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com>
Signed-off-by: Aid C. <57825561+AidCheng@users.noreply.github.com>
Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com>
Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com>
Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com>
Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull Request Overview
This PR implements a code reviewer and review checker system for merge requests (MRs), adding functionality to manage reviewers and validate review status before merging.
- Created a new Reviewer table with migration and entity model
- Added reviewer management API endpoints for adding, removing, listing, and changing reviewer approval status
- Implemented a code review checker that validates all reviewers have approved an MR before merge
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| mono/src/api/mr/mr_router.rs | Added reviewer management API endpoints and routes |
| mono/src/api/mr/model.rs | Added data models for reviewer API requests and responses |
| jupiter/src/tests.rs | Updated test storage configuration to include reviewer storage |
| jupiter/src/storage/mr_reviewer_storage.rs | Implemented reviewer storage operations |
| jupiter/src/storage/mod.rs | Integrated reviewer storage into the storage system |
| jupiter/src/migration/mod.rs | Added migration reference for reviewer table |
| jupiter/src/migration/m20250905_163011_add_mr_reviewer.rs | Created database migration for reviewer table |
| jupiter/callisto/src/prelude.rs | Exported new reviewer entity |
| jupiter/callisto/src/mod.rs | Added reviewer module |
| jupiter/callisto/src/mega_mr_reviewer.rs | Created SeaORM entity for reviewer table |
| ceres/src/merge_checker/mod.rs | Registered code review checker |
| ceres/src/merge_checker/gpg_signature_checker.rs | Updated error message formatting |
| ceres/src/merge_checker/code_review_checker.rs | Implemented code review validation checker |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| let mut err_message = String::new(); | ||
| for reviewer in reviewers { | ||
| if !reviewer.approved { | ||
| let msg = format!("Reviewer {} has not approved the MR.\n", reviewer.id); |
There was a problem hiding this comment.
The error message references reviewer.id but should reference reviewer.campsite_id which identifies the reviewer. The id field is the database primary key, not the user identifier.
| for reviewer in reviewers { | ||
| if !reviewer.approved { | ||
| let msg = format!("Reviewer {} has not approved the MR.\n", reviewer.id); | ||
| err_message = err_message + &msg; |
There was a problem hiding this comment.
String concatenation using + operator creates new string objects for each iteration. Use push_str() method instead: err_message.push_str(&msg);
Contributes to #1396