MCPcopy
hub / github.com/graphql/graphql-spec / repoNameWithOwner

Function repoNameWithOwner

scripts/generate-contributor-list.mjs:56–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54 }
55}
56function repoNameWithOwner() {
57 let url = "";
58 try { url = execGit(["remote", "get-url", "origin"]).trim(); } catch { }
59 const m = url.match(/github\.com[:/](?<owner>[^/]+)\/(?<repo>[^/]+?)(?:\.git)?$/i);
60 if (m?.groups) return `${m.groups.owner}/${m.groups.repo}`;
61 die("Could not determine GitHub repo from 'origin' remote.");
62}
63function revList(range, paths) {
64 const args = ["rev-list", range];
65 if (paths.length) args.push("--", ...paths);

Callers 1

Calls 2

execGitFunction · 0.85
dieFunction · 0.85

Tested by

no test coverage detected