MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / collectBitbucketConfig

Function collectBitbucketConfig

packages/setupWizard/src/bitbucket.ts:7–27  ·  view source on GitHub ↗
(connectionName: string)

Source from the content-addressed store, hash-verified

5import { multiInput, note, toEnvKey } from './utils.js';
6
7export async function collectBitbucketConfig(connectionName: string): Promise<CollectResult> {
8 const env: EnvVars = {};
9
10 const deploymentType = await select<'cloud' | 'server'>({
11 message: 'Which Bitbucket deployment?',
12 choices: [
13 { value: 'cloud', name: 'Bitbucket Cloud', description: 'bitbucket.org' },
14 { value: 'server', name: 'Bitbucket Data Center', description: 'self-hosted' },
15 ],
16 });
17
18 const config: BitbucketConnectionConfig = {
19 type: 'bitbucket',
20 deploymentType,
21 };
22
23 if (deploymentType === 'cloud') {
24 return collectBitbucketCloud(connectionName, config, env);
25 }
26 return collectBitbucketServer(connectionName, config, env);
27}
28
29async function collectBitbucketCloud(
30 connectionName: string,

Callers 1

mainFunction · 0.85

Calls 2

collectBitbucketCloudFunction · 0.85
collectBitbucketServerFunction · 0.85

Tested by

no test coverage detected