( url: string, )
| 36 | |
| 37 | /** Parse "workspace/repo" from a Bitbucket Cloud URL. */ |
| 38 | export function parseBitbucketUrl( |
| 39 | url: string, |
| 40 | ): { workspace: string; repo: string } | null { |
| 41 | const match = url.match(/bitbucket\.org[/:]([^/]+)\/([^/.]+)/); |
| 42 | if (!match) return null; |
| 43 | return { workspace: match[1], repo: match[2] }; |
| 44 | } |
| 45 | |
| 46 | /** Fetch a full repo tree from Bitbucket Cloud. */ |
| 47 | export async function fetchBitbucketRepoTree( |
no outgoing calls
no test coverage detected