feat: 自更新支持 GitHub 加速代理与 CNB 镜像,WebUI 可配置 - #9
Merged
Conversation
- 新增配置项 MIMO_CONSOLE_GITHUB_PROXY:空为直连,支持 gh-proxy 风格前缀、 CNB 镜像仓库地址及自定义地址;写入 .env 并热更新内存配置,保存立即生效 - 版本检测与自更新按该配置解析实际拉取地址(resolve_git_url/resolve_version_url) - 概览页新增「GitHub 加速」卡片:内置 4 个加速前缀 + CNB 镜像 + 自定义, 支持一键测试连通性(返回延迟);长 URL 选项自适应换行 - 版本号 0.1.2 → 0.1.3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
本 PR 包含三个功能,均已在 NoneBot2 + Python 3.11 环境实测通过(78 个单元测试全绿,ruff check/format 通过):
1. GitHub 加速与镜像源配置
https://cnb.cool/MimokitStudio/nonebot-plugin-mimo-console)以及自定义镜像仓库地址.env(MIMO_CONSOLE_GITHUB_PROXY)并热更新,无需重启pyproject.toml,解决国内网络下「GitHub 暂无发布版本,无法检测更新」的问题2. CNB 镜像版本检测
/-/raw返回 SPA 页面),改用 git 浅克隆读取版本号:git clone --depth 1 --filter=blob:none --sparse+sparse-checkout set --no-cone /pyproject.tomlgit ls-remote3. 插件中心禁用/启用插件
run_preprocessor抛出IgnoredException在响应器级拦截事件:禁用后该插件的 matcher 不再响应消息,后台已调度任务不受影响disabled_plugins.json,重启后仍生效其他
tests/test_version.py、tests/test_disabled.py共 20+ 测试用例