Release 2.5.1 (#271)

* feat: Support for custom authentication provider functions (#270)
* feat: Support for adding "draft" notes to the review, and publishing them, either individually or all at once. Addresses feature request #223.
* feat: Lets users select + checkout a merge request directly within Neovim, without exiting to the terminal
* fix: Checks that the remote feature branch exists and is up-to-date before creating a MR, starting a review, or opening the MR summary (#278)
* docs: We require some state from Diffview, this shows how to load that state prior to installing w/ Packer. Fixes #94.

This is a #MINOR release.

---------

Co-authored-by: Jakub F. Bortlík <jakub.bortlik@proton.me>
Co-authored-by: sunfuze <sunfuze.1989@gmail.com>
Co-authored-by: Patrick Pichler <mail@patrickpichler.dev>
This commit is contained in:
Harrison (Harry) Cramer
2024-04-22 16:56:27 -04:00
committed by GitHub
parent f10c4ebb8f
commit cf6ccddce3
42 changed files with 2830 additions and 1149 deletions

View File

@@ -3,7 +3,9 @@
-- send edits to the description back to Gitlab
local Layout = require("nui.layout")
local Popup = require("nui.popup")
local git = require("gitlab.git")
local job = require("gitlab.job")
local common = require("gitlab.actions.common")
local u = require("gitlab.utils")
local List = require("gitlab.utils.list")
local state = require("gitlab.state")
@@ -28,7 +30,7 @@ M.summary = function()
end
local title = state.INFO.title
local description_lines = M.build_description_lines()
local description_lines = common.build_content(state.INFO.description)
local info_lines = state.settings.info.enabled and M.build_info_lines() or { "" }
local layout, title_popup, description_popup, info_popup = M.create_layout(info_lines)
@@ -69,22 +71,8 @@ M.summary = function()
vim.api.nvim_set_current_buf(description_popup.bufnr)
end)
end
-- Builds a lua list of strings that contain the MR description
M.build_description_lines = function()
local description_lines = {}
local description = state.INFO.description
for line in u.split_by_new_lines(description) do
table.insert(description_lines, line)
end
-- TODO: @harrisoncramer Not sure whether the following line should be here at all. It definitely
-- didn't belong into the for loop, since it inserted an empty line after each line. But maybe
-- there is a purpose for an empty line at the end of the buffer?
table.insert(description_lines, "")
return description_lines
git.current_branch_up_to_date_on_remote(vim.log.levels.WARN)
end
-- Builds a lua list of strings that contain metadata about the current MR. Only builds the