Release: Bug Fixes and Improvements (#399)
fix: Error messages and run all tests (#381) feat: Automatically open fold under cursor (#380) fix: Discussion ID is not required (#383) chore: Add more emojis (#384) fix: Publish all drafts (#391) fix: Make discussion tree buffers no-modifiable (#394) fix: Incorrect warning about commits (#395) fix: Show draft replies in the correct tree (#396) fix: Cannot choose merge requests (#398) --------- Co-authored-by: George Kontridze <george.kontridze@gmail.com> Co-authored-by: Jakub F. Bortlík <jakub.bortlik@proton.me>
This commit is contained in:
committed by
GitHub
parent
38bde8a0e4
commit
341d56a1cb
@@ -82,6 +82,7 @@ M.add_empty_titles = function()
|
||||
{ end_row = linnr - 1, end_col = string.len(v.title), hl_group = "TitleHighlight" }
|
||||
)
|
||||
end
|
||||
M.switch_can_edit_bufs(false, v.bufnr)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -47,7 +47,7 @@ end
|
||||
--- continue working on it.
|
||||
---@param args? Mr
|
||||
M.start = function(args)
|
||||
if not git.current_branch_up_to_date_on_remote(vim.log.levels.ERROR) then
|
||||
if not git.check_current_branch_up_to_date_on_remote(vim.log.levels.ERROR) then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
@@ -49,9 +49,16 @@ local function content()
|
||||
local resolvable_notes, resolved_notes = get_data(state.DISCUSSION_DATA.unlinked_discussions)
|
||||
|
||||
local draft_notes = require("gitlab.actions.draft_notes")
|
||||
local inline_draft_notes = List.new(state.DRAFT_NOTES):filter(draft_notes.has_position)
|
||||
local unlinked_draft_notes = List.new(state.DRAFT_NOTES):filter(function(note)
|
||||
return not draft_notes.has_position(note)
|
||||
local inline_draft_notes, unlinked_draft_notes = List.new(state.DRAFT_NOTES):partition(function(note)
|
||||
if note.discussion_id == "" then
|
||||
return draft_notes.has_position(note)
|
||||
end
|
||||
for _, discussion in ipairs(state.DISCUSSION_DATA.unlinked_discussions) do
|
||||
if discussion.id == note.discussion_id then
|
||||
return false
|
||||
end
|
||||
end
|
||||
return true
|
||||
end)
|
||||
|
||||
local t = {
|
||||
|
||||
@@ -84,7 +84,7 @@ end
|
||||
|
||||
---Publishes all draft notes and comments. Re-renders all discussion views.
|
||||
M.confirm_publish_all_drafts = function()
|
||||
local body = {}
|
||||
local body = { publish_all = true }
|
||||
job.run_job("/mr/draft_notes/publish", "POST", body, function(data)
|
||||
u.notify(data.message, vim.log.levels.INFO)
|
||||
state.DRAFT_NOTES = {}
|
||||
|
||||
@@ -45,7 +45,7 @@ M.choose_merge_request = function(opts)
|
||||
end
|
||||
|
||||
vim.schedule(function()
|
||||
state.chosen_target_branch = choice.target_branch
|
||||
state.chosen_mr_iid = choice.iid
|
||||
require("gitlab.server").restart(function()
|
||||
if opts.open_reviewer then
|
||||
require("gitlab").review()
|
||||
|
||||
@@ -82,7 +82,8 @@ M.summary = function()
|
||||
vim.api.nvim_set_current_buf(description_popup.bufnr)
|
||||
end)
|
||||
|
||||
git.current_branch_up_to_date_on_remote(vim.log.levels.WARN)
|
||||
git.check_current_branch_up_to_date_on_remote(vim.log.levels.WARN)
|
||||
git.check_mr_in_good_condition()
|
||||
end
|
||||
|
||||
-- Builds a lua list of strings that contain metadata about the current MR. Only builds the
|
||||
|
||||
Reference in New Issue
Block a user