Skip to content

Commit 4c1524f

Browse files
committed
Fix broken file coverage due GitHub response format change
1 parent 0a395bf commit 4c1524f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/content/github/common/fetchers.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ import {
66
} from "src/types";
77

88
export async function getMetadata(url: string): Promise<FileMetadata> {
9-
const response = await fetch(url).then((response) => response.json());
9+
const response = await fetch(url, {
10+
headers: {
11+
"Accept": "application/json",
12+
},
13+
}).then((response) => response.json());
1014
let branch = undefined;
1115
if (response.payload.refInfo.refType === "branch") {
1216
branch = response.payload.refInfo.name;

0 commit comments

Comments
 (0)