Skip to content

Commit 41aecf3

Browse files
authored
move auth to headers (#38)
1 parent ae57d80 commit 41aecf3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/content.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ function buildUrl({
5454
sort,
5555
order,
5656
per_page,
57-
access_token,
5857
}) {
5958
let query = `${base}?q=`;
6059
query += `${author ? `+author:${author}` : ""}`;
@@ -90,7 +89,6 @@ function contributorCount({
9089
}
9190

9291
let searchURL = buildUrl({
93-
access_token,
9492
base: "https://api.github.com/search/issues",
9593
order: "asc",
9694
per_page: "1",
@@ -103,7 +101,11 @@ function contributorCount({
103101
sort: "created",
104102
});
105103

106-
return fetch(searchURL)
104+
return fetch(searchURL, {
105+
headers: {
106+
Authorization: `token ${access_token}`,
107+
},
108+
})
107109
.then((res) => res.json())
108110
.then(function (json) {
109111
if (json.errors || json.message) {

0 commit comments

Comments
 (0)