MCPcopy Index your code
hub / github.com/refined-github/refined-github / getMergeBaseReference

Function getMergeBaseReference

source/features/restore-file.tsx:17–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15let focusedFileContainer: HTMLElement | undefined;
16
17async function getMergeBaseReference(): Promise<string> {
18 const {base, head} = getBranches();
19 // This v3 response is relatively large, but it doesn't seem to be available on v4
20 // Cache buster due to: https://github.com/refined-github/refined-github/issues/7312
21 const response = await api.v3(`compare/${base.relative}...${head.relative}?cachebust=${Date.now()}`);
22 return response.merge_base_commit.sha; // #4679
23}
24
25async function getHeadReference(): Promise<string> {
26 const {base} = getBranches();

Callers 1

getFileFunction · 0.85

Calls 1

getBranchesFunction · 0.85

Tested by

no test coverage detected