♻️ refactor(vscode): 代码托管仓库抽成统一接口,Gitea 实现搬到 provider 后面,翻页改看 Link 头

This commit is contained in:
cruldra committed 2026-10-19 07:56:40 +11:00
1 parent c90d84d7f2
commit 14bee9f505
64 files changed
+1881 -2718

No files matched your search

+2 -2
View File
@@ -1,11 +1,11 @@
/**
* Fetch-based YouTrack REST client.
*
* Mirrors the role of `src/gitea/api.ts` for the second issue source. All
* Mirrors the role of the [Gitea provider](vscode/src/forge/gitea/provider.ts) for the second issue source. All
* requests authenticate with a YouTrack permanent token via
* `Authorization: Bearer <token>`. Non-2xx responses surface as
* `YouTrackApiError` so callers can distinguish 401 (token invalid) from other
* failures, matching the Gitea client's contract.
* failures, matching the forge clients' contract.
*/
export class YouTrackApiError extends Error {
+3 -3
View File
@@ -1,13 +1,13 @@
/**
* Loads YouTrack-sourced issues into the panel's `Issue` shape — the YouTrack
* counterpart of `src/gitea/issueLoader.ts`.
* counterpart of the [forge issue loader](vscode/src/forge/issueLoader.ts).
*
* Returns `[]` (not an error) when YouTrack isn't configured, so the panel can
* always call this alongside the Gitea loader and just merge the results.
* always call this alongside the forge loader and just merge the results.
*/
import type { ExtensionContext } from 'vscode'
import type { Issue } from '../gitea/types'
import type { Issue } from '../issues/types'
import type { YouTrackIssue } from './api'
import { workspace } from 'vscode'
import { getYouTrackToken } from '../auth/secrets'