Skip to content

Conversation

xrgzs
Copy link
Member

@xrgzs xrgzs commented Aug 10, 2025

增加 CNB Release 驱动

https://cnb.cool/

https://github.com/orgs/OpenListTeam/discussions/1025

TODO: 增加文档 OpenListTeam/OpenList-Docs#132

CNB 发行版非正常文件系统,存在一些无法解决的问题,请勿反馈。

  1. 空仓库需要先初始化
  2. Tag / Release 目录下不支持子目录
  3. OpenAPI 上传返回 expires_in_sec 仅为 10 s,上传大文件会超时,超时后仍会继续上传然后返回 token 无效,因此增加了本地超时机制,达到上传接口返回的设定时间时自动停止上传,避免上传失败、浪费流量
  4. 不支持 移动复制重命名 操作
  5. 仅支持在关闭 使用Tag名称 时,通过修改 Release 的名称进行重命名

@xrgzs xrgzs requested a review from Copilot August 10, 2025 16:47
Copilot

This comment was marked as outdated.

@xrgzs xrgzs requested a review from Copilot August 10, 2025 16:54
Copilot

This comment was marked as outdated.

@xrgzs xrgzs marked this pull request as ready for review August 11, 2025 09:18
@xrgzs xrgzs marked this pull request as draft August 17, 2025 06:51
@xrgzs xrgzs requested a review from Copilot August 17, 2025 07:11
Copy link
Contributor

@Copilot Copilot AI left a 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.

@xrgzs xrgzs marked this pull request as ready for review August 17, 2025 07:26
@xrgzs xrgzs added enhancement 增强/功能请求 go Pull requests that update go code labels Aug 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 增强/功能请求 go Pull requests that update go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant