We need to rebuild the binary whenever the plugin has changed.
Previously we were not doing this if the binary already existed. This MR
adds an override parameter to the build() function which will force a
rebuild even if the binary already exists.
The README has been updated to note that this parameter should be used
for Packer/Lazy, and when someone is troubleshooting. It won't be passed
in to the build function during the normal setup call.
Should address #55
This MR adds the `.pipeline()` command which opens up the pipeline popup. This popup shows information about the current pipeline and it's jobs, and gives users the ability to re-trigger failed jobs.
Previously, the merge function would override the entire default table during a
merge if a matching table was found in the override table.
This would prevent users from modifying a single setting (for instance changing
just a single icon, rather than the whole thing)
BREAKING CHANGE: This MR addresses an underlying issue with the original implementation in regards to detecting line numbers for comments.
As such, this is a major breaking change. The setup function signature has changed, please review the `README.md` for the new arguments. The delta pager has also been added as a dependency: https://github.com/dandavison/delta
There will be future work to implement a native solution for parsing changes and line numbers.
This MR simplifies the plugin quite a bit by only attempting to start the Go server after you specifically try to run a command. This streamlines working on feature branches and removes the need for a `base_branch` property entirely.
Adds APIs for the ability to add or remove reviewers and assignees to a merge request. The eligible reviewers and assignees are pulled from the current members of a project.
We weren't writing a 200 status code post-delete because Gitlab returns
a 204 (empty but successful) by default. I updated this logic to change
that and also to refresh the tree.
The collapsed state of the tree will be wiped out if you delete a
bottom-level discussion but that's okay for now, not a high priority
right now.
We want to pick the note ID more carefully for deletion.
If it's the root node (aka the first comment in a discussion thread) then
we want to choose the root_note_id since that is the ID of the first
comment in the discussion. Otherwise, we want to choose the note_node
ID.
* Changed to relative time
* Added days
* Updated display of discussion tree
* Updated a lot of functionality + behaviors for discussions + comments
* Modified state on deletion/creation
* Fixed relative times
This MR improves the configurability of the plugin by using Nui's split
system rather than managing the splits ourselves. This lets the user
configure both the positioning of the discussion tree and it's width,
and reduces overall maintenance of split management for the plugin.
This ensures that the state for the plugin has been initialized prior to
calling any of the other jobs. This ensures that they won't error if
called quickly after Neovim starts up
This should hopefully make it easier to debug and for users to figure
out what's going on by exposing the state of the plugin.
It is a Lua table, and can be seen via `:lua print(require("gitlab").state)`
The easiest way to print out a Lua table is with some sort of utility
function like this:
```
function printTable(...)
local objects = {}
for i = 1, select("#", ...) do
local v = select(i, ...)
table.insert(objects, vim.inspect(v))
end
print(table.concat(objects, "\n"))
return ...
end
```
This MR makes several major tweaks to the codebase. Primarily it adjusts
the setup steps for the application so that rather than providing just
the project ID in the `.gitlab.nvim` file, users can also provide a
vareity of other settings, such as auth_token, base_branch, and so
forth. This is to make the project more extensible in the future.
This MR also fixes a variety of issues with error handling in the code,
primarily in the request/response model between the Lua jobs and the
Golang server.
BREAKING CHANGE: Modifies `.gitlab.nvim` and setup steps
This commit changes the filter on the API response so that we are only
filtering out system level notes. This means we get notes that are not
linked to specific locations in the code.
Subsequent work will have to separate these types of notes from the
other code-linked notes and probably display them in some sort of
separate tree.