From 5372744ae57e855e07a0919798d50810475e3b94 Mon Sep 17 00:00:00 2001 From: Breck Yunits Date: Thu, 30 Jun 2022 10:07:35 -1000 Subject: [PATCH] GitHub requires auth via headers now and not query string. See https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/ --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index abfb6da..eb212d7 100644 --- a/src/index.js +++ b/src/index.js @@ -10,11 +10,11 @@ export default function ({ } = {}) { const request = page => fetch.get(`https://api.github.com/repos/${owner}/${repo}/commits`, { params: { - access_token: token, sha, per_page: 100, page - } + }, + headers: {Authorization: `token ${token}`}, }).then(res => { const {headers: {link}, data} = res if (!link || page !== 1) {