Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(server,web): a project can use its own GitHub account #16379

Closedulughbeck(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/16379/headopened View on GitHub

Showing 18 changed files with 81 additions and 6 deletions (loading 15).

x
0 of 18 viewed, 18 left
13 additions and 6 deletionsapps/server/src/git/GitManager.tsModified
View file
@@ -82,6 +82,7 @@
import type { GitManagerServiceError } from "@t3tools/contracts";
import * as GitVcsDriver from "../vcs/GitVcsDriver.ts";
import * as SourceControlProviderRegistry from "../sourceControl/SourceControlProviderRegistry.ts";
+import { makeGitHubProjectAccount } from "../sourceControl/gitHubProjectAccount.ts";
import { detectPrTemplate } from "../sourceControl/PrTemplateDetection.ts";
import type { ChangeRequest } from "@t3tools/contracts";
​
@@ -2923,18 +2924,24 @@
+ // Everything that reaches the host runs as the checkout's project account.
+ const { actAs } = yield* makeGitHubProjectAccount;
return GitManager.of({
createWorktree,
localStatus,
- remoteStatus,
- status,
- branchPullRequest,
+ remoteStatus: (input, options) => actAs(input, remoteStatus(input, options)),
+ status: (input) => actAs(input, status(input)),
+ branchPullRequest: (input, options) => actAs(input, branchPullRequest(input, options)),
invalidateLocalStatus,
invalidateRemoteStatus,
invalidateStatus,
- resolvePullRequest,
- preparePullRequestThread,
- runStackedAction,