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

Function collectGenericGitConfig

packages/setupWizard/src/genericGit.ts:5–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import type { CollectResult } from './utils.js';
4
5export async function collectGenericGitConfig(): Promise<CollectResult> {
6 const url = await input({
7 message: 'Git clone URL (e.g. https://github.com/sourcebot-dev/sourcebot)',
8 validate: (v) => {
9 if (!v?.trim()) {
10 return 'URL is required';
11 }
12 if (!/^https?:\/\//.test(v)) {
13 return 'Must start with http:// or https://';
14 }
15 return true;
16 },
17 });
18
19 const config: GenericGitHostConnectionConfig = {
20 type: 'git',
21 url,
22 };
23
24 return { connections: [{ config }], env: {} };
25}

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected