fix(github): find pull requests in every git repository of the project (#1084)

A project folder that holds several git repositories without being one itself showed "No GitHub repository" in Pull Requests: every gh command ran in the project folder.

The GitHub remotes now come from each of the project's git repositories, and each remote remembers its repository. gh commands take the repository to run in (the primary one when none is given), and checkout, diff, worktree, merge, push, suggestions and new pull requests use the connected repository.

Fixes #812
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-04 02:36:56 +08:00
1 джерело 5e7339e4c2
коміт 63801ba249
18 files changed
+278 -102

No files matched your search

+3 -1
Переглянути файл
@@ -14,7 +14,7 @@ vi.mock("@/platform/ipc", async (importOriginal) => {
...real.commands,
fsProbe: () => Promise.resolve({ status: "error", error: "none" }),
vcsFileAt: (_path: string, rev: string) => Promise.resolve({ status: "ok", data: texts[rev] ?? "" }),
ghApi: (req: unknown) => ghApi(req),
ghApi: (_repo: unknown, req: unknown) => ghApi(req),
},
};
});
@@ -158,6 +158,8 @@ beforeEach(() => {
coordinates: { owner: "o", name: "r" },
repository: { id: "R1", viewerPermission: "READ" } as GHRepository,
currentUser: me,
root: null,
remotes: [],
},
});
setPullRequestData(