mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-13 10:15:41 +08:00
Fix test
This commit is contained in:
parent
713df46b80
commit
4ea9d1a0af
@ -11,6 +11,8 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ] ; then
|
|||||||
git clone https://github.com/wsdjeg/GitHub.vim.git build/GitHub.vim
|
git clone https://github.com/wsdjeg/GitHub.vim.git build/GitHub.vim
|
||||||
docker run -it --rm \
|
docker run -it --rm \
|
||||||
-v $PWD/.ci:/.ci \
|
-v $PWD/.ci:/.ci \
|
||||||
|
-v $PWD/autoload/SpaceVim/api:/API/autoload/SpaceVim/api \
|
||||||
|
-v $PWD/autoload/SpaceVim/api.vim:/API/autoload/SpaceVim/api.vim \
|
||||||
-v $PWD/build:/build \
|
-v $PWD/build:/build \
|
||||||
spacevim/vims neovim-stable -u /.ci/common/github_commenter.vim
|
spacevim/vims neovim-stable -u /.ci/common/github_commenter.vim
|
||||||
rm build_log
|
rm build_log
|
||||||
@ -25,6 +27,8 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ] ; then
|
|||||||
git clone https://github.com/wsdjeg/GitHub.vim.git build/GitHub.vim
|
git clone https://github.com/wsdjeg/GitHub.vim.git build/GitHub.vim
|
||||||
docker run -it --rm \
|
docker run -it --rm \
|
||||||
-v $PWD/.ci:/.ci \
|
-v $PWD/.ci:/.ci \
|
||||||
|
-v $PWD/autoload/SpaceVim/api:/API/autoload/SpaceVim/api \
|
||||||
|
-v $PWD/autoload/SpaceVim/api.vim:/API/autoload/SpaceVim/api.vim \
|
||||||
-v $PWD/build:/build \
|
-v $PWD/build:/build \
|
||||||
spacevim/vims neovim-stable -u /.ci/common/github_commenter.vim
|
spacevim/vims neovim-stable -u /.ci/common/github_commenter.vim
|
||||||
rm build_log
|
rm build_log
|
||||||
|
@ -6,6 +6,8 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ] ; then
|
|||||||
git clone https://github.com/wsdjeg/GitHub.vim.git build/GitHub.vim
|
git clone https://github.com/wsdjeg/GitHub.vim.git build/GitHub.vim
|
||||||
docker run -it --rm \
|
docker run -it --rm \
|
||||||
-v $PWD/.ci:/.ci \
|
-v $PWD/.ci:/.ci \
|
||||||
|
-v $PWD/autoload/SpaceVim/api:/API/autoload/SpaceVim/api \
|
||||||
|
-v $PWD/autoload/SpaceVim/api.vim:/API/autoload/SpaceVim/api.vim \
|
||||||
-v $PWD/build:/build \
|
-v $PWD/build:/build \
|
||||||
spacevim/vims neovim-stable -u /.ci/common/github_commenter.vim
|
spacevim/vims neovim-stable -u /.ci/common/github_commenter.vim
|
||||||
elif [ "$LINT" = "vint-errors" ] ; then
|
elif [ "$LINT" = "vint-errors" ] ; then
|
||||||
@ -13,6 +15,8 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ] ; then
|
|||||||
git clone https://github.com/wsdjeg/GitHub.vim.git build/GitHub.vim
|
git clone https://github.com/wsdjeg/GitHub.vim.git build/GitHub.vim
|
||||||
docker run -it --rm \
|
docker run -it --rm \
|
||||||
-v $PWD/.ci:/.ci \
|
-v $PWD/.ci:/.ci \
|
||||||
|
-v $PWD/autoload/SpaceVim/api:/API/autoload/SpaceVim/api \
|
||||||
|
-v $PWD/autoload/SpaceVim/api.vim:/API/autoload/SpaceVim/api.vim \
|
||||||
-v $PWD/build:/build \
|
-v $PWD/build:/build \
|
||||||
spacevim/vims neovim-stable -u /.ci/common/github_commenter.vim
|
spacevim/vims neovim-stable -u /.ci/common/github_commenter.vim
|
||||||
elif [ "$LINT" = "vader" ] ; then
|
elif [ "$LINT" = "vader" ] ; then
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
exe 'set nocp'
|
exe 'set nocp'
|
||||||
set rtp+=build/GitHub.vim
|
set rtp+=build/GitHub.vim
|
||||||
|
set rtp+=/API/
|
||||||
so build/GitHub.vim/plugin/github.vim
|
so build/GitHub.vim/plugin/github.vim
|
||||||
so build/GitHub.vim/autoload/github/api/issues.vim
|
so build/GitHub.vim/autoload/github/api/issues.vim
|
||||||
so build/GitHub.vim/autoload/github/api/util.vim
|
so build/GitHub.vim/autoload/github/api/util.vim
|
||||||
|
let s:LIST = SpaceVim#api#import('data#list')
|
||||||
let s:log = filereadable('build_log') ? system('cat build_log') : ''
|
let s:log = filereadable('build_log') ? system('cat build_log') : ''
|
||||||
function! s:update_log(log, summary, new_log) abort
|
function! s:update_log(log, summary, new_log) abort
|
||||||
let log = split(a:log, "\n")
|
let log = split(a:log, "\n")
|
||||||
@ -17,6 +19,7 @@ function! s:update_log(log, summary, new_log) abort
|
|||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
if begin != -1 && end != -1
|
if begin != -1 && end != -1
|
||||||
|
return s:LIST.replace(log, begin, end, split(a:new_log, "\n"))
|
||||||
else
|
else
|
||||||
return a:log . "\n" . a:new_log
|
return a:log . "\n" . a:new_log
|
||||||
endif
|
endif
|
||||||
@ -47,5 +50,26 @@ if !empty(s:log)
|
|||||||
\ {'body': s:update_log(s:comment.body, s:summary, s:log)}, 'SpaceVimBot', $BOTSECRET)
|
\ {'body': s:update_log(s:comment.body, s:summary, s:log)}, 'SpaceVimBot', $BOTSECRET)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
else
|
||||||
|
if $LINT == 'vader'
|
||||||
|
let s:summary = $VIM . ' ' . $LINT . ' build log'
|
||||||
|
else
|
||||||
|
let s:summary = $LINT . ' build log'
|
||||||
|
endif
|
||||||
|
let s:log = '<details><summary>' . s:summary . "</summary>\n" . s:log . "\n</details>"
|
||||||
|
let s:comments = github#api#issues#List_comments('SpaceVim', 'SpaceVim',$TRAVIS_PULL_REQUEST ,'')
|
||||||
|
if !empty(s:comments)
|
||||||
|
let s:nr = 0
|
||||||
|
for s:comment in s:comments
|
||||||
|
if s:comment.user.login ==# 'SpaceVimBot'
|
||||||
|
let s:nr = s:comment.id
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
if s:nr != 0
|
||||||
|
call github#api#issues#Edit_comment('SpaceVim','SpaceVim', s:nr,
|
||||||
|
\ {'body': s:update_log(s:comment.body, s:summary, s:log)}, 'SpaceVimBot', $BOTSECRET)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
quit
|
quit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user