Skip to content

feat(mono): added merge checker#1367

Merged
genedna merged 1 commit into
gitmono-dev:mainfrom
benjamin-747:main
Aug 22, 2025
Merged

feat(mono): added merge checker#1367
genedna merged 1 commit into
gitmono-dev:mainfrom
benjamin-747:main

Conversation

@benjamin-747

Copy link
Copy Markdown
Collaborator

No description provided.

@vercel

vercel Bot commented Aug 22, 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 Aug 22, 2025 9:29am

@benjamin-747 benjamin-747 changed the title feat(mono): added merge check feat(mono): added merge checker Aug 22, 2025

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 adds a merge checker system to validate merge requests before they are merged. The system introduces configurable checks that can be run on MRs, starting with an MR sync checker to detect merge conflicts.

  • Added database schema for storing check configurations and results
  • Implemented a checker registry system with a pluggable architecture
  • Created MR sync checker to validate merge request synchronization status

Reviewed Changes

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

Show a summary per file
File Description
mono/src/api/api_router.rs Modified get_latest_commit to handle monorepo paths differently
jupiter/src/storage/mr_storage.rs Added methods for updating MR hashes and managing check configurations/results
jupiter/src/model/mr_dto.rs Added MrInfoDto struct for passing MR information to checkers
jupiter/src/migration/ Added database migration and tables for check configurations and results
jupiter/callisto/src/ Added enum definitions and entity models for check types and results
ceres/src/merge_checker/ Implemented the checker registry and MR sync checker
ceres/src/pack/monorepo.rs Integrated merge checking into the MR workflow
ceres/src/api_service/ Minor formatting cleanup

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

])
.to_owned(),
)
.do_nothing()

Copilot AI Aug 22, 2025

Copy link

Choose a reason for hiding this comment

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

The .do_nothing() call conflicts with the preceding .update_columns() call. When using on_conflict().update_columns(), you should not call .do_nothing() as it overrides the update behavior. Remove .do_nothing() to allow the conflict resolution to update the specified columns.

Suggested change
.do_nothing()

Copilot uses AI. Check for mistakes.
#[async_trait]
impl Checker for MrSyncChecker {
async fn run(&self, params: &serde_json::Value) -> CheckResult {
let params = MrSyncParams::from_value(params).expect("parse params err");

Copilot AI Aug 22, 2025

Copy link

Choose a reason for hiding this comment

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

The error message "parse params err" is not descriptive. Consider using a more helpful message like "Failed to parse MR sync parameters" to help with debugging.

Suggested change
let params = MrSyncParams::from_value(params).expect("parse params err");
let params = MrSyncParams::from_value(params).expect("Failed to parse MR sync parameters");

Copilot uses AI. Check for mistakes.
.mr_storage()
.get_mr(link)
.await?
.expect("MR Not Found");

Copilot AI Aug 22, 2025

Copy link

Choose a reason for hiding this comment

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

The error message "MR Not Found" should be more descriptive and follow consistent formatting. Consider using "Failed to find MR" or a similar message that provides more context.

Suggested change
.expect("MR Not Found");
.expect(&format!("Failed to find MR for link: {}", link));

Copilot uses AI. Check for mistakes.
@genedna
genedna added this pull request to the merge queue Aug 22, 2025
Merged via the queue into gitmono-dev:main with commit ef8cf58 Aug 22, 2025
11 checks passed
liuyangjuncong20202570 pushed a commit to liuyangjuncong20202570/mega that referenced this pull request Aug 23, 2025
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