Allow token authentication on github

This commit is contained in:
Yannick Galatol 2015-11-29 13:03:00 +01:00
parent 57805ea471
commit 41f4bf36d7

View File

@ -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'];