MCPcopy
hub / github.com/cursor/community-plugins / parseGitHubUrl

Function parseGitHubUrl

apps/cursor/src/lib/github-plugin/parse.ts:119–125  ·  view source on GitHub ↗
(
  url: string,
)

Source from the content-addressed store, hash-verified

117}
118
119export function parseGitHubUrl(
120 url: string,
121): { owner: string; repo: string } | null {
122 const match = url.match(/github\.com\/([^/]+)\/([^/]+?)(?:\.git)?(?:\/|$)/);
123 if (!match) return null;
124 return { owner: match[1], repo: match[2] };
125}
126
127export function githubAuthHeaders(): Record<string, string> {
128 return process.env.GITHUB_TOKEN

Callers 3

runSecurityAgentFunction · 0.90
parseGitHubPluginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected