(connectionName: string)
| 5 | import { multiInput, note, toEnvKey } from './utils.js'; |
| 6 | |
| 7 | export 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 | |
| 29 | async function collectBitbucketCloud( |
| 30 | connectionName: string, |
no test coverage detected