Skip to content

Commit cd79791

Browse files
joestringerldelossa
authored andcommitted
Fix review comment threads for pending reviews
Commit d6afb4f ("gh_exec uses extra args like async_request") inadvertently introduced some malformed GitHub CLI commands by merging multiple field parameters together. This would result in the following runtime error when attempting to add a comment to a pending PR review: E5108: Error executing lua: .../gh.nvim/lua/litee/gh/ghcli/init.lua:834: attempt to call a string value stack traceback: .../gh.nvim/lua/litee/gh/ghcli/init.lua:834: in function 'create_comment_review' .../gh.nvim/lua/litee/gh/pr/thread_buffer.lua:740: in function 'create' .../gh.nvim/lua/litee/gh/pr/thread_buffer.lua:842: in function <...ts/.vim/bundle/gh.nvim/lua/litee/gh/pr/thread_buffer.lua:823> Fix it by introducing the necessary commas to separate the fields. CC: Matthias Bilger <matthias@bilger.info> Fixes: d6afb4f ("gh_exec uses extra args like async_request") Signed-off-by: Joe Stringer <joe@isovalent.com>
1 parent 3181973 commit cd79791

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lua/litee/gh/ghcli/init.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ function M.create_comment_review(pull_id, review_id, body, path, line, side)
830830
"-F",
831831
string.format("line=%d", line),
832832
"-F",
833-
string.format("side=%s", side)
833+
string.format("side=%s", side),
834834
"-f",
835835
string.format("query=%s", graphql.create_comment_review)
836836
}
@@ -860,9 +860,9 @@ function M.create_comment_review_multiline(pull_id, review_id, body, path, start
860860
"-F",
861861
string.format("line=%d", line),
862862
"-F",
863-
string.format("start_side=%s", side)
863+
string.format("start_side=%s", side),
864864
"-F",
865-
string.format("side=%s", side)
865+
string.format("side=%s", side),
866866
"-f",
867867
string.format("query=%s", graphql.create_comment_review_multiline)
868868
}

0 commit comments

Comments
 (0)