MCPcopy Create free account
hub / github.com/refined-github/refined-github / parseCurrentUrl

Function parseCurrentUrl

source/features/useful-not-found-page.tsx:45–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43}
44
45function parseCurrentUrl(): string[] {
46 const parts = getCleanPathname().split('/');
47 if (parts[2] === 'blob') { // Blob URLs are never useful
48 parts[2] = 'tree';
49 }
50
51 return parts;
52}
53
54async function getLatestCommitToFile(branch: string, filePath: string): Promise<string> {
55 const {repository} = await api.v4(GetLatestCommitToFile, {

Callers 2

showMissingPartOnceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected