diff options
Diffstat (limited to 'build/constants.js')
-rw-r--r-- | build/constants.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/build/constants.js b/build/constants.js index 3c0c7e9..c620a32 100644 --- a/build/constants.js +++ b/build/constants.js @@ -55,7 +55,7 @@ async function fetchGithubApi(method, route, headers, json) { try { if (_1.debug) console.debug('fetching github api', method, route); - return await node_fetch_1.default(githubApiBase + route, { + const data = await node_fetch_1.default(githubApiBase + route, { agent: () => httpsAgent, body: json ? JSON.stringify(json) : null, method, @@ -63,6 +63,9 @@ async function fetchGithubApi(method, route, headers, json) { 'Authorization': `token ${process.env.github_token}` }, headers), }); + if (_1.debug) + console.debug('fetched github api', method, route); + return data; } catch { // if there's an error, wait a second and try again |