feat(KB-015): add git remote selection to GitHub import modal

- Add backend API endpoint to list git remotes for a repository
- Add frontend API client and types for git remotes
- Update GitHub import modal with remote dropdown selector
- Add tests for git remotes API and import modal
This commit is contained in:
gsxdsm
2026-03-29 17:57:47 -07:00
parent a7f008f92f
commit e95e50ba68
7 changed files with 265 additions and 26 deletions

View File

@@ -5,10 +5,15 @@ import { apiFetchGitHubIssues, apiImportGitHubIssue } from "../../api";
import type { Task } from "@kb/core";
// Mock the API module
vi.mock("../../api", () => ({
apiFetchGitHubIssues: vi.fn(),
apiImportGitHubIssue: vi.fn(),
}));
vi.mock("../../api", async (importOriginal) => {
const actual = await importOriginal<typeof import("../../api")>();
return {
...actual,
apiFetchGitHubIssues: vi.fn(),
apiImportGitHubIssue: vi.fn(),
fetchGitRemotes: vi.fn().mockResolvedValue([]),
};
});
const mockTask: Task = {
id: "KB-001",