Skip to content

refactor!: 删 NewClientFromOAuthToken 兼容构造 - #16

Merged
zy84338719 merged 1 commit into
masterfrom
refactor/drop-oauth-compat-constructor
Nov 13, 2026
Merged

zy84338719 merged 1 commit into
masterfrom
refactor/drop-oauth-compat-constructor

Conversation

@zy84338719

Copy link
Copy Markdown
Member

BREAKING CHANGE

删 Deprecated 包级构造 NewClientFromOAuthToken(token):它固定用公网 base URL,私有部署丢 URL 的坑已由 OAuthClient.NewClient(token)(沿用 OAuthClient 的 base URL)修复。旧构造仓内零消费(仅 examples 注释提及),示例注释同步改指 oauth.NewClient(token)。

下游要做什么

// 旧(私有部署下客户端会指向公网)
client := gitcode.NewClientFromOAuthToken(token)
// 新
client := oauth.NewClient(token)

验证:make release-check 全绿(build/vet/test -short)。

Deprecated 包级构造 NewClientFromOAuthToken 固定公网 base URL,私有部署
丢 URL 的坑已由 OAuthClient.NewClient(沿用 OAuthClient 的 base URL)修复;
旧构造零消费(仅示例注释提及),删除收口。示例注释同步改指 oauth.NewClient。

**BREAKING**:仓外若用 gitcode.NewClientFromOAuthToken(token),改
oauth.NewClient(token)(私有部署必须用后者,否则客户端指向公网)。
@zy84338719
zy84338719 merged commit 0f5cf1e into master Nov 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant