Skip to content

Resolvable reviews#1442

Merged
benjamin-747 merged 16 commits into
gitmono-dev:mainfrom
AidCheng:check
Sep 13, 2025
Merged

Resolvable reviews#1442
benjamin-747 merged 16 commits into
gitmono-dev:mainfrom
AidCheng:check

Conversation

@AidCheng

@AidCheng AidCheng commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

Summary

This pull request introduces key improvements to the reviewer and review conversation system in the MR workflow:

  • Refactored reviewer schema – Switched to mr_link and username; added timestamps.
  • Added review resolution state – Introduced a resolved field for tracking conversation status.
  • Updated reviewer logic – Normalized storage and methods around mr_link.
  • Improved API consistency – Aligned endpoints and payloads with the new data model.
  • Enhanced review comment flow – Automatically tags reviewer comments as Review.

AidCheng and others added 10 commits September 5, 2025 10:41
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>
Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com>
@vercel

vercel Bot commented Sep 11, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
mega Ready Ready Preview Comment Sep 12, 2025 7:39pm

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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 refactors the reviewer and review conversation system to improve the MR workflow by transitioning from ID-based to link-based operations and adding review resolution capabilities.

Key changes:

  • Refactored reviewer schema to use mr_link and username instead of mr_id and campsite_id
  • Added review resolution state tracking with a resolved field in conversations
  • Enhanced review comment flow to automatically tag reviewer comments as Review type

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
mono/src/api/mr/mr_router.rs Updated API endpoints to use new reviewer schema and added review resolution endpoint
mono/src/api/mr/model.rs Modified payload structures to align with new data model
jupiter/src/storage/mr_reviewer_storage.rs Refactored storage methods to use mr_link and username parameters
jupiter/src/storage/conversation_storage.rs Added review resolution state management functionality
jupiter/src/migration/m20250910_153212_add_username_to_reviewer.rs Database migration for schema changes
jupiter/callisto/src/mega_mr_reviewer.rs Updated entity model with new fields
jupiter/callisto/src/mega_conversation.rs Added resolved field to conversation model
jupiter/callisto/src/entity_ext/mega_conversation.rs Enhanced conversation creation with resolution state
ceres/src/merge_checker/code_review_checker.rs Updated to use new reviewer storage interface
Comments suppressed due to low confidence (1)

ceres/src/merge_checker/code_review_checker.rs:69

  • The code references reviewer.id but the new reviewer model uses username field. This should be reviewer.username.
                let msg = format!("Reviewer {} has not approved the MR.\n", reviewer.id);

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

pub struct Migration;

#[async_trait::async_trait]
#[async_trait::async_trait]

Copilot AI Sep 12, 2025

Copy link

Choose a reason for hiding this comment

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

Duplicate #[async_trait::async_trait] attribute should be removed. Only one instance is needed.

Suggested change
#[async_trait::async_trait]

Copilot uses AI. Check for mistakes.
e
})?;

Ok(true)

Copilot AI Sep 12, 2025

Copy link

Choose a reason for hiding this comment

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

The is_reviewer method always returns Ok(true) regardless of whether a reviewer is found. It should return Ok(reviewer.is_some()) to correctly indicate if the user is a reviewer.

Copilot uses AI. Check for mistakes.
tracing::error!("{}", e);
MegaError::with_message(format!("fail to update reviewer {}", reviewer.clone()))
MegaError::with_message(format!("fail to update reviewer {}", reviewer_username))

Copilot AI Sep 12, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] Extra blank line between error message and closing bracket should be removed for consistency.

Suggested change

Copilot uses AI. Check for mistakes.
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>
@benjamin-747
benjamin-747 added this pull request to the merge queue Sep 13, 2025
Merged via the queue into gitmono-dev:main with commit e0bcfe8 Sep 13, 2025
26 of 29 checks passed
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.

3 participants