1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 22:50:06 +08:00

feat(github): update github plugin

This commit is contained in:
wsdjeg 2022-05-29 20:59:18 +08:00
parent 0c18fa74f3
commit d45150caba
2 changed files with 1038 additions and 1034 deletions

View File

@ -14,8 +14,12 @@ function! github#api#users#starred(user,page) abort
endfunction
function! github#api#users#starred_pages(user) abort
let l:i = systemlist('curl -si https://api.github.com/users/' . a:user . '/starred | grep -E "^Link"')[0]
return split(matchstr(l:i,'=\d\+',0,2),'=')[0]
let result = system('curl -si https://api.github.com/users/' . a:user . '/starred')
if !v:shell_error
let i = filter(split(result, "\n"), 'v:val =~# "^Link"')[0]
return split(matchstr(i,'=\d\+',0,2),'=')[0]
endif
return 0
endfunction
function! github#api#users#GetStarred(user) abort