支持编辑文件后自动创建 CL 并触发构建流程#1877
Conversation
Signed-off-by: Ruizhi Huang <231220075@smail.nju.edu.cn> fix problems
…o-dev#1457) (gitmono-dev#1567) * feat: remove unnecessary mr components and rename enum mr_sync to cl_sync(gitmono-dev#1457) * feat: remove unnecessary mr components and rename enum mr_sync to cl_sync(gitmono-dev#1457) --------- Co-authored-by: s_yangjunke <s_yangjunke@wps.com> Co-authored-by: Quanyi Ma <eli@patch.sh>
Signed-off-by: acfboy <acfboyu@outlook.com>
…itmono-dev#1574) * refactor: Change tags/refs from query parameters to path parameters - Components now uniformly read the version from router.query.version - Routes changed to: /tree/[version]/[...path] and /blob/[version]/[...path] - URL example: /mega/code/tree/1.0.0/doc (formerly /tree/doc?refs=1.0.0) - Fixed user display error on the Tag page * refactor: Change tags/refs from query parameters to path parameters - Components now uniformly read the version from router.query.version - Routes changed to: /tree/[version]/[...path] and /blob/[version]/[...path] - URL example: /mega/code/tree/1.0.0/doc (formerly /tree/doc?refs=1.0.0) - Fixed user display error on the Tag page
…dev#1575) - Show "New File" and "New Folder" buttons only on main branch - Display SyncRepoButton for repository synchronization only on main branch under third-party path
* refactor * restore UI edits Signed-off-by: Ruizhi Huang <231220075@smail.nju.edu.cn> * accept code review comments Signed-off-by: Ruizhi Huang <231220075@smail.nju.edu.cn> --------- Signed-off-by: Ruizhi Huang <231220075@smail.nju.edu.cn>
Signed-off-by: allure <1550220889@qq.com>
Signed-off-by: allure <1550220889@qq.com>
…er information (gitmono-dev#1581) Signed-off-by: Ruizhi Huang <231220075@smail.nju.edu.cn>
Co-authored-by: Quanyi Ma <eli@patch.sh>
* fix: Add committer parameter to the create_entry API and bind committer information Signed-off-by: Ruizhi Huang <231220075@smail.nju.edu.cn> * fix: Support finding the latest commit for a file Signed-off-by: Ruizhi Huang <231220075@smail.nju.edu.cn> fix reviews Signed-off-by: Ruizhi Huang <231220075@smail.nju.edu.cn> --------- Signed-off-by: Ruizhi Huang <231220075@smail.nju.edu.cn>
Signed-off-by: allure <1550220889@qq.com>
* Add copilot-instructions.md for GitHub copilot Signed-off-by: Eli Ma <eli@patch.sh> * Update .github/copilot-instructions.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Quanyi Ma <eli@patch.sh> --------- Signed-off-by: Eli Ma <eli@patch.sh> Signed-off-by: Quanyi Ma <eli@patch.sh> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…itmono-dev#1586) - Remove edit option under Tags - Fix path duplication bug to prevent version tags from appearing twice - Fetch latest commit data and improve date display - Add avatar info when creating new files/folders
gitmono-dev#1587) Signed-off-by: MYUU <1405758738@qq.com>
Signed-off-by: Luxian <lux1an@qq.com>
Signed-off-by: MYUU <1405758738@qq.com>
…no-dev#1594) * refactor: rm user table && fix tag pointing to wrong tree hash Signed-off-by: Ruizhi Huang <231220075@smail.nju.edu.cn> cargo fmt Signed-off-by: Ruizhi Huang <231220075@smail.nju.edu.cn> * accept reviews Signed-off-by: Ruizhi Huang <231220075@smail.nju.edu.cn> --------- Signed-off-by: Ruizhi Huang <231220075@smail.nju.edu.cn>
* [saturn]FEAT: Midware Guard in Mono Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com> * UPDATE: cargo fmt Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com> * [mono]ADD: add entitystore to mono api state Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com> * UPDATE:fmt Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com> --------- Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com>
* [mono]FIX: Change Resolve Auth to Reviewer Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com> * UPDATE: user username from campsiteAPI Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com> --------- Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com>
…tmono-dev#1598) * feat: Implement online file editor and Diff preview functionality - Provide editing and Diff preview modes - Support file renaming feature - Fix blame timeline - Fix lastCommit avatar display * Update moon/apps/web/components/CodeView/BlobView/BlobEditor.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: 卷娄 <zhaokang.r2cn@isrc.iscas.ac.cn> * Update moon/apps/web/components/CodeView/CommitHistory.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: 卷娄 <zhaokang.r2cn@isrc.iscas.ac.cn> --------- Signed-off-by: 卷娄 <zhaokang.r2cn@isrc.iscas.ac.cn> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ono-dev#1599) * fix: Add CL filter box echo functionality and multiple UI fixes - Add filter condition echo functionality to CL list - Fix tag editor scroll synchronization issue - Fix double line break issue when creating files with Enter key - Fix clone path display issue showing "main" - Fix UI misalignment in tag dropdown list * fix: Add CL filter box echo functionality and multiple UI fixes - Add filter condition echo functionality to CL list - Fix tag editor scroll synchronization issue - Fix double line break issue when creating files with Enter key - Fix clone path display issue showing "main" - Fix UI misalignment in tag dropdown list
Signed-off-by: MYUU <1405758738@qq.com>
…e for Issue and CL (gitmono-dev#1601) - Leverage additional object with filter state as single source of truth - Fix null value issue when selecting labels in Issue - Fix bug where labels are cleared after selecting assignee in Issue/CL - Comment out Search component in Issue, replace with read-only filter display - Simplify dropdown configs to directly update state
|
@codex review |
|
Claude finished @genedna's task in 1m 35s —— View job Code Review Complete ✓I've completed a comprehensive review of PR #1877. Here are my findings: OverviewThis PR successfully implements automatic CL (Change List) creation and build triggering after file edits, replacing the previous direct commit approach. The implementation is generally well-structured with good separation of concerns. Strengths
Issues & Recommendations🔴 Critical Issues
🟡 Important Issues
🟢 Minor Issues
Security Considerations✅ Good: No SQL injection risks (using ORM) Performance Considerations✅ Good: Background task spawning prevents blocking the edit response Documentation
SummaryThe PR implements the required functionality correctly, but has 2 critical issues that should be addressed before merging:
The code is otherwise well-structured with good English documentation. After addressing these issues, this will be a solid implementation of the CL workflow. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c501d92f69
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let path = PathBuf::from(file_path); | ||
| let repo_path = path | ||
| .parent() | ||
| .map(|p| p.to_string_lossy().to_string()) | ||
| .unwrap_or_else(|| "/".to_string()); |
There was a problem hiding this comment.
Resolve repo root before looking up main ref
Here repo_path is derived from the immediate parent directory of the edited file. For edits under nested subdirectories (e.g., /repo/src/file.rs), this becomes /repo/src, but get_main_ref is keyed by the repository root path (e.g., /repo). That makes create_new_cl fail with “Main ref not found” for typical edits and blocks CL creation/builds. The repo root should be resolved before calling get_main_ref rather than using the file’s parent directory.
Useful? React with 👍 / 👎.
| async fn find_or_create_cl_for_edit( | ||
| &self, | ||
| mode: EditCLMode, | ||
| to_hash: &str, | ||
| commit_message: &str, | ||
| file_path: &str, | ||
| username: &str, | ||
| ) -> Result<mega_cl::Model, GitError> { |
There was a problem hiding this comment.
The new CL creation/reuse flow for web edits (find_or_create_cl_for_edit, create_new_cl) and build triggering via trigger_build_for_cl introduce non-trivial behavior (different EditCLMode paths, skip_build flag, background build trigger) but there are no targeted tests covering these code paths, even though MonoApiService already has a test module. Please add tests that exercise at least ForceCreate, TryReuse (with/without link), and skip_build behavior to guard against regressions in the CL/build workflow.
89426b5 to
b5bef43
Compare
Signed-off-by: miliu2cc <miliu2cc@gmail.com>
48cc3da to
0adcfd4
Compare
…ild process after editing files.
Signed-off-by: Chen-Rong-Zi <1398881912@qq.com>
Signed-off-by: Chen-Rong-Zi <1398881912@qq.com>
Signed-off-by: Chen-Rong-Zi <1398881912@qq.com>
--- 修改github GPG验证配置 Signed-off-by: Chen-Rong-Zi <1398881912@qq.com>
0adcfd4 to
53dfea4
Compare
53dfea4 to
eec20e3
Compare
eec20e3 to
cc72799
Compare
Summary
编辑文件后不再直接生成 Commit
当用户在 UI / API 中编辑文件并保存时:
BuildContext类型转换中实现)from_hash以及to_hash字段, 可能需要修改该结构体)自动或显式新建 CL
编辑文件后:
force_create设置为否时尝试获取当前的cl)force_create参数)from_hash以及to_hash对应的commit动态计算)from_hash以及to_hash对应的commit动态计算)基于 CL 触发构建
CL 创建或更新后:
新增:
skip_build参数, 抑制构建可选- [x] 构建前相关代码已删除, 对应功能应该在新构建系统内实现MonoApiService::should_trigger_build可根据changed_files动态判断是否构建, 目前总是返回字面常量truefeat: implement build trigger system #1880
related issue
#1872