Skip to content

Commit

Permalink
Merge pull request #35 from himanoa/#31
Browse files Browse the repository at this point in the history
Fix a bug in goshiteki#post_submit where leaving buffer fails if file not being written
  • Loading branch information
himanoa committed Nov 9, 2020
2 parents c8b873b + 5a33722 commit d433441
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion autoload/goshiteki.vim
Expand Up @@ -67,7 +67,10 @@ function! g:goshiteki#submit_reviews(status) abort
endfunction

function! g:goshiteki#post_submit(status, tempname, pr_id) abort
let l:body = join(readfile(a:tempname), "\n")
let l:body = ''
if filereadable(a:tempname)
let l:body = join(readfile(a:tempname), "\n")
endif
call system([s:script_dir . 'submit-review.sh', a:pr_id, l:body, a:status, "./.REVIEW_COMMENT_STATE"])
echo "Submit review(status: " . "a:status" . ")"
endfunction
Expand Down

0 comments on commit d433441

Please sign in to comment.