add git api key support

This commit is contained in:
kepler155c@gmail.com 2019-01-12 10:17:56 -05:00
parent 25031bfdc2
commit cb5f690cf4
1 changed files with 4 additions and 0 deletions

View File

@ -5,6 +5,10 @@ local TREE_URL = 'https://api.github.com/repos/%s/%s/git/trees/%s?recursive=1'
local FILE_URL = 'https://raw.githubusercontent.com/%s/%s/%s/%s'
local git = { }
if _G._GIT_API_KEY then
TREE_URL = TREE_URL .. '&access_token=' .. _G._GIT_API_KEY
end
function git.list(repository)
local t = Util.split(repository, '(.-)/')