You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we want to add a reviewer, it would have to implement the functions at lua/gitlab/reviewer/init.lua
-- This Module will pick the reviewer set in the user's-- settings and then map all of it's functionslocalstate=require("gitlab.state")
localdelta=require("gitlab.reviewer.delta")
localM= {
reviewer=nil,
}
localreviewer_map= {
delta=delta
}
M.init=function()
localreviewer=reviewer_map[state.settings.reviewer]
ifreviewer==nilthenvim.notify(string.format("gitlab.nvim could not find reviewer %s", state.settings.reviewer), vim.log.levels.ERROR)
returnendM.open=reviewer.open-- Opens the reviewer windowM.jump=reviewer.jump-- Jumps to the location provided in the reviewer window-- Parameters:-- • {file_name} The name of the file to jump to-- • {new_line} The new_line of the change-- • {interval} The old_line of the changeM.get_location=reviewer.get_location-- Returns the current location (based on cursor) from the reviewer window (file_name, line_numbers, error) where line_numbers is a lua table like this: { old_line: old_line_num, new_line: new_line_num }endreturnM
These functions pull information from the current buffer and pass it to the comment module, which will send the comment to Gitlab. I'm intending to work on supporting Diffview (this is the reviewer that I've used in the past as well) but haven't gotten to it yet.
On the latest version of plugin,
.create_comment()
works only from review panel.Error message
Delta reviewer must be initialized first
I'm using diffview to review MRs.
Is it possible to make it work without Delta reviewer?
The text was updated successfully, but these errors were encountered: