MCPcopy Create free account
hub / github.com/pingdotgg/t3code / getSourceControlPresentation

Function getSourceControlPresentation

apps/web/src/sourceControlPresentation.ts:26–62  ·  view source on GitHub ↗
(
  provider: SourceControlProviderInfo | null | undefined,
)

Source from the content-addressed store, hash-verified

24}
25
26export function getSourceControlPresentation(
27 provider: SourceControlProviderInfo | null | undefined,
28): SourceControlPresentation {
29 const presentation = resolveChangeRequestPresentation(provider);
30 switch (presentation.icon) {
31 case "github":
32 return {
33 providerName: provider?.name || presentation.providerName,
34 terminology: getChangeRequestTerminology(provider),
35 Icon: GitHubIcon,
36 };
37 case "gitlab":
38 return {
39 providerName: provider?.name || presentation.providerName,
40 terminology: getChangeRequestTerminology(provider),
41 Icon: GitLabIcon,
42 };
43 case "azure-devops":
44 return {
45 providerName: provider?.name || presentation.providerName,
46 terminology: getChangeRequestTerminology(provider),
47 Icon: AzureDevOpsIcon,
48 };
49 case "bitbucket":
50 return {
51 providerName: provider?.name || presentation.providerName,
52 terminology: getChangeRequestTerminology(provider),
53 Icon: BitbucketIcon,
54 };
55 case "change-request":
56 return {
57 providerName: provider?.name || presentation.providerName,
58 terminology: getChangeRequestTerminology(provider),
59 Icon: GitPullRequestIcon,
60 };
61 }
62}

Callers 4

PullRequestThreadDialogFunction · 0.90
GitActionsControlFunction · 0.90

Tested by

no test coverage detected