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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user