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

@@ -21,12 +21,12 @@ end
---Filters a given list
---@generic T
---@param func fun(v: T):boolean
---@param func fun(v: T, i: integer):boolean
---@return List<T> @Returns a new list of elements for which func returns true
function List:filter(func)
local result = List.new()
for _, v in ipairs(self) do
if func(v) == true then
for i, v in ipairs(self) do
if func(v, i) == true then
table.insert(result, v)
end
end
@@ -63,6 +63,19 @@ function List:slice(first, last, step)
return sliced
end
---Returns true if any of the elements can satisfy the callback
---@generic T
---@param func fun(v: T, i: integer):boolean
---@return List<T> @Returns a boolean
function List:includes(func)
for i, v in ipairs(self) do
if func(v, i) == true then
return true
end
end
return false
end
function List:values()
local result = {}
for _, v in ipairs(self) do