Skip to content

Commit d67484f

Browse files
committed
fix: check local branch up-to-date on remote before creating comment
1 parent 3d2828a commit d67484f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lua/gitlab/actions/comment.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,10 @@ M.can_create_comment = function(must_be_visual)
349349
return false
350350
end
351351

352+
if not git.check_current_branch_up_to_date_on_remote(vim.log.levels.ERROR) then
353+
return false
354+
end
355+
352356
-- Check we're in visual mode for code suggestions and multiline comments
353357
if must_be_visual and not u.check_visual_mode() then
354358
return false

0 commit comments

Comments
 (0)