-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(drivers): add cnb_releases #1033
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
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 introduces a new driver for CNB Releases integration, providing OpenList with the ability to manage GitHub-like releases and assets from the CNB platform. The driver enables users to browse releases as directories and manage release assets through OpenList's interface.
- Adds complete CNB Releases driver implementation with API integration
- Implements core file operations (list, upload, delete, create) with platform-specific limitations
- Includes custom timeout handling for upload operations due to CNB's short token expiration
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
drivers/cnb_releases/driver.go | Main driver implementation with API operations and file management |
drivers/cnb_releases/types.go | Type definitions for CNB API response structures |
drivers/cnb_releases/util.go | Utility functions for API requests and asset size calculations |
drivers/cnb_releases/meta.go | Driver configuration and registration |
drivers/all.go | Registers the new CNB Releases driver |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
增加 CNB Release 驱动
https://cnb.cool/
https://github.com/orgs/OpenListTeam/discussions/1025
TODO: 增加文档OpenListTeam/OpenList-Docs#132CNB 发行版非正常文件系统,存在一些无法解决的问题,请勿反馈。
expires_in_sec
仅为 10 s,上传大文件会超时,超时后仍会继续上传然后返回token 无效
,因此增加了本地超时机制,达到上传接口返回的设定时间时自动停止上传,避免上传失败、浪费流量移动
、复制
、重命名
操作使用Tag名称
时,通过修改 Release 的名称进行重命名