(input: {
repo: string
ref?: string
auth?: { username?: string; token: string }
depth?: number | 'full'
})
| 35 | } |
| 36 | |
| 37 | export function githubRepo(input: { |
| 38 | repo: string |
| 39 | ref?: string |
| 40 | auth?: { username?: string; token: string } |
| 41 | depth?: number | 'full' |
| 42 | }): WorkspaceSource { |
| 43 | const url = input.repo.startsWith('http') |
| 44 | ? input.repo |
| 45 | : `https://github.com/${input.repo}.git` |
| 46 | return { |
| 47 | type: 'git', |
| 48 | url, |
| 49 | ref: input.ref, |
| 50 | auth: input.auth, |
| 51 | depth: input.depth, |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | export function localSource(path: string): WorkspaceSource { |
| 56 | return { type: 'local', path } |
no outgoing calls
no test coverage detected