Closed AkashiCoin closed 2 months ago
此拉取请求将与 GitHub 相关的操作重构到一个单独的实用程序模块中,更新了自动更新和插件商店功能以使用新的实用程序,并对 WebUI 资产管理进行了一些调整。更改旨在改善代码组织、可重用性和可维护性。
更改 | 详情 | 文件 |
---|---|---|
将与 GitHub 相关的操作提取到一个新的实用程序模块中 |
|
zhenxun/utils/github_utils/models.py zhenxun/utils/github_utils/func.py zhenxun/utils/github_utils/consts.py zhenxun/utils/github_utils/__init__.py |
更新自动更新功能以使用新的 GitHub 实用程序 |
|
zhenxun/builtin_plugins/auto_update/_data_source.py zhenxun/builtin_plugins/auto_update/config.py |
重构插件商店以使用新的 GitHub 实用程序 |
|
zhenxun/builtin_plugins/plugin_store/data_source.py zhenxun/builtin_plugins/plugin_store/config.py |
更新 WebUI 资产管理 |
|
zhenxun/builtin_plugins/web_ui/public/__init__.py zhenxun/builtin_plugins/web_ui/public/data_source.py zhenxun/builtin_plugins/web_ui/config.py |
更新测试以适应新的 GitHub 实用程序 |
|
tests/builtin_plugins/auto_update/test_check_update.py |
Summary by Sourcery
将与 GitHub 相关的操作重构到一个专用的实用程序模块中,增强模块化和可重用性。更新自动更新和 Web UI 资产管理流程以使用新的实用程序函数,提高一致性和可维护性。调整测试以符合重构后的代码。
增强功能:
测试:
Original summary in English
## Summary by Sourcery Refactor GitHub-related operations into a dedicated utility module, enhancing modularity and reusability. Update the auto-update and web UI asset management processes to use the new utility functions, improving consistency and maintainability. Adjust tests to align with the refactored code. Enhancements: - Refactor GitHub-related operations into a separate utility module for better modularity and reusability. - Improve the update mechanism by using a unified method to fetch version information and download URLs from GitHub. - Enhance the web UI asset management by dynamically determining folders to mount and improving logging. - Simplify the configuration by removing hardcoded GitHub URLs and patterns, and using a default GitHub URL. Tests: - Update tests to reflect changes in GitHub URL handling and ensure compatibility with the new utility functions.