feat(integrations): add review fetching and Linux keyring support
Add a cross-provider Review Center and improve credential handling. Backend integrations fetch and normalize PRs from GitHub, GitLab, Gitea, and Azure DevOps with improved timeouts and parsing. Credentials now use a global lock and support secret-tool on Linux to avoid races. - Normalize review data across providers (GitHub/GitLab/Gitea/Azure) - Serialize credential access with OnceLock and use secret-tool on Linux - Add frontend ReviewCenter component and related UI updates
This commit is contained in:
@@ -17,6 +17,8 @@ import type {
|
||||
GitIgnoreKind,
|
||||
GitIntegrationProvider,
|
||||
GitIntegrationRepository,
|
||||
IntegrationReviewRequest,
|
||||
IntegrationReviewAction,
|
||||
GitLfsStatus,
|
||||
GitRepositoryFile,
|
||||
GitRemote,
|
||||
@@ -59,6 +61,26 @@ export function listIntegrationRepositories(provider: GitIntegrationProvider, ba
|
||||
return invoke<GitIntegrationRepository[]>("list_integration_repositories", { provider, baseUrl, accountId: accountId ?? null });
|
||||
}
|
||||
|
||||
export function listIntegrationReviewRequests(provider: GitIntegrationProvider, baseUrl: string, username: string, token: string, state: "open" | "merged" | "closed"): Promise<IntegrationReviewRequest[]> {
|
||||
return invoke<IntegrationReviewRequest[]>("list_integration_review_requests", { provider, baseUrl, username, token, state });
|
||||
}
|
||||
|
||||
export function runIntegrationReviewAction(provider: GitIntegrationProvider, baseUrl: string, username: string, token: string, request: IntegrationReviewRequest, action: IntegrationReviewAction): Promise<void> {
|
||||
return invoke<void>("run_integration_review_action", { provider, baseUrl, username, token, repositoryId: request.repositoryId, repositoryName: request.repositoryName, number: request.number, action });
|
||||
}
|
||||
|
||||
export function getIntegrationReviewDetails(provider: GitIntegrationProvider, baseUrl: string, username: string, token: string, request: IntegrationReviewRequest): Promise<IntegrationReviewRequest> {
|
||||
return invoke<IntegrationReviewRequest>("get_integration_review_details", { provider, baseUrl, username, token, request });
|
||||
}
|
||||
|
||||
export function addIntegrationReviewComment(provider: GitIntegrationProvider, baseUrl: string, username: string, token: string, request: IntegrationReviewRequest, body: string): Promise<void> {
|
||||
return invoke<void>("add_integration_review_comment", { provider, baseUrl, username, token, request, body });
|
||||
}
|
||||
|
||||
export function openInBrowser(url: string): Promise<void> {
|
||||
return invoke<void>("open_in_browser", { url });
|
||||
}
|
||||
|
||||
export function launchExternalTool(path: string, command: ExternalToolCommand, file?: string): Promise<void> {
|
||||
return invoke<void>("launch_external_tool", { path, file: file ?? null, command });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user