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:
parent
0c18fa74f3
commit
d45150caba
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user