( repository: string, )
| 9 | const githubURL = /github.com(:|\/)([\w.-]+\/[\w.-]+?)(.git|\/.*)?$/ |
| 10 | |
| 11 | function parseRepoString( |
| 12 | repository: string, |
| 13 | ): null | { repo: string; org: string; provider: "GitHub" } { |
| 14 | if (repository.startsWith("github:")) { |
| 15 | repository = repository.replace(/^github:/, "") |
| 16 | } |
| 17 | const urlMatch = repository.match(githubURL) |
| 18 | if (urlMatch) { |
| 19 | repository = urlMatch[2] |
| 20 | } |
| 21 | |
| 22 | const specMatch = repository.match(repoSpecifier) |
| 23 | |
| 24 | if (!specMatch) { |
| 25 | return null |
| 26 | } |
| 27 | const [, org, repo] = specMatch |
| 28 | |
| 29 | return { org, repo, provider: "GitHub" } |
| 30 | } |
| 31 | |
| 32 | export function getPackageVCSDetails(packageDetails: PackageDetails) { |
| 33 | const repository = require(resolve(join(packageDetails.path, "package.json"))) |
no outgoing calls
no test coverage detected
searching dependent graphs…