Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(github): use the right account for each repository #6052

ClosedDominicVonk(GitHub profile, opens in a new tab)wants to merge 20 commits intomain fromrefs/pull/6052/headopened View on GitHub

Showing 26 changed files with 29 additions and 1 deletion (loading 24).

x
0 of 26 viewed, 26 left
2 additions and 0 deletionsapps/server/src/git/GitManager.test.tsModified
View file
@@ -493,6 +493,8 @@
return {
service: {
execute,
+ getBatchKey: (input) =>
+ Effect.succeed(`active:${(input.host ?? "github.com").toLowerCase()}`),
listOpenPullRequests: (input) =>
execute({
cwd: input.cwd,
27 additions and 1 deletionapps/server/src/pullRequest/GitHubPullRequestCli.test.tsModified
View file
@@ -941,6 +941,7 @@
});
​
const args = callAt(0).args;
+ expect(callAt(0).repositories).toEqual(["acme/web"]);
expect(args).toContain("--hostname");
expect(args).toContain("github.acme.dev");
expect(args).toContain("owner=acme");
@@ -1298,12 +1299,37 @@
+ it.effect("uses the requested host token when looking up the viewer", () =>
+ Effect.gen(function* () {
+ mockedExecute.mockReturnValueOnce(Effect.succeed(output("octocat")));
+ const cli = yield* GitHubPullRequestCli.GitHubPullRequestCli;