revert推送到cnb - #2508
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. 💤 Files selected but had no reviewable changes (1)
⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthrough源码同步改为按 GitHub、CNB、Gitee 顺序拉取并报告来源或失败原因,新增 CNB 镜像配置,移除旧代码源设置入口与相关提示,并删除 CNB 同步工作流。 Changes多源源码同步
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant GitService
participant GitHub
participant CNB
participant Gitee
participant LocalRepository
GitService->>GitHub: fetch 主来源
GitHub-->>GitService: 返回成功或错误
GitService->>CNB: fetch fallback 来源
CNB-->>GitService: 返回成功或错误
GitService->>Gitee: fetch fallback 来源
Gitee-->>GitService: 返回成功或错误
GitService->>LocalRepository: 更新 origin/<branch> 或返回失败汇总
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
8dcffea to
aa586b3
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/one_dragon_qt/view/source_config_interface.py (1)
176-176: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value补充缺失的返回值类型注解。
按照项目的代码规范,所有函数签名都必须包含类型注解。虽然根据所学知识,
__init__不应添加-> None返回值注解,但对于其他普通的方法,应显式标明返回值类型。建议为本次更改范围内的这两个方法补充-> None:
src/one_dragon_qt/view/source_config_interface.py#L176-L176: 在_on_region_changed的签名末尾补充-> None。src/one_dragon_qt/view/source_config_interface.py#L194-L194: 在_init_config_values的签名末尾补充-> None。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/one_dragon_qt/view/source_config_interface.py` at line 176, 为 src/one_dragon_qt/view/source_config_interface.py 第176行的 _on_region_changed 和第194行的 _init_config_values 方法补充 -> None 返回值类型注解;无需修改其他方法。Sources: Coding guidelines, Learnings
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/one_dragon/envs/project_config.py`:
- Line 14: 为配置成员 cnb_https_repository 补充类型注解,声明其类型为 str |
None,以覆盖配置缺失时返回空值的情况;保持现有 self.get('cnb_https_repository') 初始化逻辑不变。
---
Nitpick comments:
In `@src/one_dragon_qt/view/source_config_interface.py`:
- Line 176: 为 src/one_dragon_qt/view/source_config_interface.py 第176行的
_on_region_changed 和第194行的 _init_config_values 方法补充 -> None 返回值类型注解;无需修改其他方法。
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e8fd43b9-be92-4863-b337-c683a79172b9
📒 Files selected for processing (9)
.github/workflows/sync-cnb.ymlconfig/project.ymldocs/develop/one_dragon/runtime_launcher.mdsrc/one_dragon/envs/env_config.pysrc/one_dragon/envs/git_service.pysrc/one_dragon/envs/project_config.pysrc/one_dragon_qt/view/setting/setting_env_interface.pysrc/one_dragon_qt/view/source_config_interface.pysrc/one_dragon_qt/widgets/install_card/code_install_card.py
💤 Files with no reviewable changes (3)
- .github/workflows/sync-cnb.yml
- src/one_dragon_qt/widgets/install_card/code_install_card.py
- src/one_dragon_qt/view/setting/setting_env_interface.py
| self.github_homepage = self.get('github_homepage') | ||
| self.github_https_repository = self.get('github_https_repository') | ||
| self.github_ssh_repository = self.get('github_ssh_repository') | ||
| self.cnb_https_repository = self.get('cnb_https_repository') |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
为新增配置成员补充类型注解。
该配置可能缺失,下游也显式处理了空地址,建议声明为 str | None。
建议修改
- self.cnb_https_repository = self.get('cnb_https_repository')
+ self.cnb_https_repository: str | None = self.get('cnb_https_repository')As per coding guidelines,src/**/*.py 要求“所有函数签名和类成员变量都必须有类型注解”。
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| self.cnb_https_repository = self.get('cnb_https_repository') | |
| self.cnb_https_repository: str | None = self.get('cnb_https_repository') |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/one_dragon/envs/project_config.py` at line 14, 为配置成员 cnb_https_repository
补充类型注解,声明其类型为 str | None,以覆盖配置缺失时返回空值的情况;保持现有 self.get('cnb_https_repository')
初始化逻辑不变。
Source: Coding guidelines
Summary by CodeRabbit
新功能
界面调整
文档
维护