MCPcopy Index your code
hub / github.com/ds300/patch-package / getPackageVCSDetails

Function getPackageVCSDetails

src/createIssue.ts:32–47  ·  view source on GitHub ↗
(packageDetails: PackageDetails)

Source from the content-addressed store, hash-verified

30}
31
32export function getPackageVCSDetails(packageDetails: PackageDetails) {
33 const repository = require(resolve(join(packageDetails.path, "package.json")))
34 .repository as undefined | string | { url: string }
35
36 if (!repository) {
37 return null
38 }
39 if (typeof repository === "string") {
40 return parseRepoString(repository)
41 } else if (
42 typeof repository === "object" &&
43 typeof repository.url === "string"
44 ) {
45 return parseRepoString(repository.url)
46 }
47}
48
49export function shouldRecommendIssue(
50 vcsDetails: ReturnType<typeof getPackageVCSDetails>,

Callers 2

makePatchFunction · 0.90
openIssueCreationLinkFunction · 0.85

Calls 3

resolveFunction · 0.90
joinFunction · 0.90
parseRepoStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…