From 41f4bf36d731b5962f00c35878fdeea5ca874a28 Mon Sep 17 00:00:00 2001 From: Yannick Galatol Date: Sun, 29 Nov 2015 13:03:00 +0100 Subject: [PATCH] Allow token authentication on github --- server.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server.js b/server.js index 1bfcd84..5ecddbe 100644 --- a/server.js +++ b/server.js @@ -4540,6 +4540,11 @@ var githubHeaders = { 'Accept': 'application/vnd.github.v3+json' }; +// You can manage your personal github token at https://github.com/settings/tokens +if (serverSecrets && serverSecrets.gh_token) { + githubHeaders['Authorization'] = 'token ' + serverSecrets.gh_token; +} + // Given a number, string with appropriate unit in the metric system, SI. // Note: numbers beyond the peta- cannot be represented as integers in JS. var metricPrefix = ['k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'];