Commit Graph

124 Commits

Author SHA1 Message Date
Harrison (Harry) Cramer
36f512cd6d 2.1.0 (#241)
• removes the <esc> keybinding for popups which was causing folks to lose their changes
• deprecates the backup register.
• updates go-gitlab to latest in order to get "drafts" functionality
• fixes issues with labels not deleting correctly
• creates a new data() function to get data from the plugin directly, see :h gitlab.nvim.data
• fixes issues with line values not being computed directly, blocking jumps to/from discussion tree

This is a #MINOR release.
2024-04-07 21:45:19 -04:00
Guillaume
12c4acb297 fix: correcting some problem with review mode (#225)
Addresses issues where the new and old lines were not being set correctly
2024-04-07 21:37:55 -04:00
Harrison (Harry) Cramer
4f1fe4ae25 Allow insecure connections to Gitlab (#234)
This MR makes it possible to ignore bad x509 certificates when connecting to Gitlab, by creating a custom HTTP connection. The option is exposed via the setup function. This is a PATCH release.
2024-04-02 21:53:25 -04:00
Harrison (Harry) Cramer
670f08849f Bug Fixes (#227)
This adds some miscellaneous bug fixes, it's a PATCH release.
2024-03-28 09:13:45 -04:00
Harrison (Harry) Cramer
c0c67486d1 fix: ranged comment issues (#214)
This MR changes the hunk parsing strategy for ranged comments in the new SHA. Now, we're only parsing and comparing the new lines. Fixes an issue where you could leave a ranged comment in the new buffer on an unchanged line and the plugin would not detect the line number correctly.
2024-03-04 10:52:13 -05:00
Harrison (Harry) Cramer
c73d22996e Fix: Fixes Misspelling In Diagnostics Settings Check (#210)
This is a #PATCH fix release
2024-03-03 12:15:57 -05:00
Harrison (Harry) Cramer
2943fae3f3 fix: Update help docs w/ changes to diagnostic configuration (#208)
Fix alert for diagnostic configuration update
2024-03-03 12:06:14 -05:00
Harrison (Harry) Cramer
b5b475ce8b 2.0.0 (#196)
This MR is a #MAJOR breaking change to the plugin. While the plugin will continue to work for users with their existing settings, they will be informed of outdated configuration (diagnostics and signs have been simplified) the next time they open the reviewer.

Fix: Trim trailing slash from custom URLs
Update: .github/CONTRIBUTING.md, .github/ISSUE_TEMPLATE/bug_report.md
Feat: Improve discussion tree toggling (#192)
Fix: Toggle modified notes (#188)
Fix: Toggle discussion nodes correctly
Feat: Show Help keymap in discussion tree winbar
Fix: Enable toggling nodes from the note body
Fix: Enable toggling resolved status from child nodes
Fix: Only try to show emoji popup on note nodes
Feat: Add keymap for toggling tree type
Fix: Disable tree type toggling in Notes
Fix Multi Line Issues (Large Refactor) (#197)
Fix: Multi-line discussions. The calculation of a range for a multiline comment has been consolidated and moved into the location.lua file. This does not attempt to fix diagnostics.
Refactor: It refactors the discussions code to split hunk parsing and management into a separate module
Fix: Don't allow comments on modified buffers #194 by preventing comments on the reviewer when using --imply-local and when the working tree is dirty entirely.
Refactor: It introduces a new List class for data aggregation, filtering, etc.
Fix: It removes redundant API calls and refreshes from the discussion pane
Fix: Location provider (#198)
Fix: add nil check for Diffview performance issue (#199)
Fix: Switch Tabs During Comment Creation (#200)
Fix: Check if file is modified (#201)
Fix: Off-By-One Issue in Old SHA (#202)
Fix: Rebuild Diagnostics + Signs (#203)
Fix: Off-By-One Issue in New SHA (#205)
Fix: Reviewer Jumps to wrong location (#206)

BREAKING CHANGE: Changes configuration of diagnostics and signs in the setup call.
2024-03-03 11:52:37 -05:00
Jakub F. Bortlík
f6a5238d4b Fix: Toggle modified notes (#188)
* Fix: Toggle discussion nodes correctly
* Feat: Show Help keymap in discussion tree winbar
2024-02-24 13:06:16 -05:00
Harrison (Harry) Cramer
faf2a25dc4 Fix: Line Comment Refactor (#180)
This MR re-implements and fixes logic that better handles single-line comments. It does this by parsing the hunk headers and examining the actual changes they contain in order to form the Gitlab payload correctly. Addresses #128
2024-02-18 21:19:31 -05:00
Harrison (Harry) Cramer
baee20b279 Add/Show/Delete Emojis on Notes (#181)
This MR adds the ability to view, add, and delete emojis from notes and comments.

This action can be performed by default with the `Ea` (emoji add) keybinding, and the `Ed` (emoji delete) keybinding. Only emojis added by the current user are eligible for deletion. The MR also implements a popup functionality which shows the user who added emojis on hover.

Implements #179
2024-02-18 21:16:53 -05:00
Jakub F. Bortlík
99741178f9 Fix: Improve visibility of pipeline popup (#184) 2024-02-18 09:01:10 -05:00
Jakub F. Bortlík
3f1c5effe5 Feat collapse and expand nodes (#176)
This MR adds the ability to expand and collapse nodes in the discussion tree in bulk. You can now toggle expansion of all nodes, toggle expansion of only resolved discussions, and toggle expansion of only unresolved discussions.

The MR also adjusts keybindings in the discussion tree to support forward and backward searching, as well as the keybinding for the help popup.

Thank you for the contribution @jakubbortlik!

This is a #MINOR bump since it's changing keybindings, although core workflows are unchanged.
2024-02-13 11:39:21 -05:00
Jakub F. Bortlík
6046669391 Feat: Make MR title input window configurable (#174)
Feat: Make MR title input window configurable
2024-02-11 13:08:29 -05:00
Harrison (Harry) Cramer
affc475d31 Fix: Do not refresh discussion tree prior to creation (#169)
This MR fixes an issue where someone could leave a note on an MR without opening the discussion tree first. We want to avoid throwing an error by attempting to update the discussion tree if it doesn't already exist.
2024-02-10 11:21:38 -05:00
Jakub F. Bortlík
d05a23a7d5 Fix: Keep empty lines in discussion tree (#173)
* Docs: Fix typos and remove trailing spaces

* Fix: Split strings by new lines correctly

* Docs: Recommend breakindent option to improve tree nodes indentation

* Fix: Replace whole buffer when creating a new suggestion

Previously, a trailing empty line was left in the buffer.

---------

Co-authored-by: Jakub Bortlík <jakub.bortlik@phonexia.com>
2024-02-10 11:06:56 -05:00
Jakub F. Bortlík
132dd60b95 Feat: save popup contents to register (#163)
Users can now provide a backup register when creating comments, notes, and so forth which will automatically be populated with the contents of the buffer prior to submission to Gitlab. This ensures that even if the API call fails the contents of the buffer is saved, which prevents the user from losing their changes. This is a MINOR update.
2024-01-22 08:14:40 -05:00
Harrison (Harry) Cramer
b6f023373a Fix: De-Register Tabpage on Correct Close Event (#168)
This fixes a bug where the reviewer tab would be erroneously marked as closed. This is a PATCH release.
2024-01-22 07:30:08 -05:00
Harrison (Harry) Cramer
b623c06119 Fix: Write to correct window if user changes during loading state (#167)
This MR fixes issue #165 where you could accidentally load the discussions tree into the wrong window if you switched while the content was still loading. This is a PATCH release.
2024-01-20 23:35:56 -05:00
d-karl
a01a3210c1 Allow use of --imply_local when calling DiffviewOpen, allowing LSP use and linting in MR review (#162)
Adds the ability to use the local filesystem when doing reviews by passing the `--imply-local` flag to the reviewer. This functionality is disabled by default. If users make changes to their filesystem (the files are "dirty") the default reviewer (hashes not files) will be use. This is a MINOR release.
2024-01-20 18:06:24 -05:00
Harrison (Harry) Cramer
519791c81c Fix: Discussion + Note Creation Bugs (#151)
This MR is an attempt to resolve some of the issues this plugin is experiencing with Gitlab's API surrounding comments, in particular the specifics around when to send the "old line" versus "new line" and the file hashes.

This is a PATCH release.
2024-01-13 10:52:45 -05:00
Harrison (Harry) Cramer
ed3a90cf00 Feat: Add target branch to details panel (#160)
This is a PATCH release, it adds the target branch to the details panel in the summary view.
2024-01-13 10:45:17 -05:00
Harrison (Harry) Cramer
50e06ceff6 Feat: Add and Remove Labels from an MR (#159)
This MR adds the ability to add or remove labels to a merge request. These labels are visible in the summary panel and are colored the same way as they would be in the Gitlab UI.

This is a MINOR release.
2024-01-13 10:37:05 -05:00
Harrison (Harry) Cramer
67f09e559a Add Better Help Documentation (#157)
Adds better documentation that's searchable within Neovim via the `:help` command. This is a NONE release.
2024-01-12 22:36:14 -05:00
Harrison (Harry) Cramer
37a53842d0 Feat: Create Merge Request (#149)
- Adds the ability to create MRs to the plugin
- Adds the ability to jump to specific discussions/notes in the browser
- Fixes stale icons
- Adds debug keybinding for discussion tree for developers
2023-12-19 13:41:07 -05:00
Harrison (Harry) Cramer
35f0bc16a5 fixed sign/diagnostic filtering (#150)
This was a small diagnostics/signs regression introduced by #147.

We were filtering the diagnostics and discussions but then not actually using the filtered data. Facepalm.
2023-12-18 17:00:04 -05:00
Harrison (Harry) Cramer
571173c881 fix: Comments on unchanged, expanded lines (#146)
This MR fixes an issue with refreshes of the diagnostics and signs when users leave comments on unchanged lines.
2023-12-18 09:11:15 -05:00
Harrison (Harry) Cramer
64b36ac51d Feat: Adds Ability to Merge MR (#147)
This adds the ability to merge an MR from within `gitlab.nvim` directly. If the reviewer is open, it'll be closed automatically. Users may configure whether they'd like to squash commits on the merge, as well as whether they'd like to delete the original source branch on a merge.

If squashing, users are prompted to provide an optional custom squash message for the squash commit.
2023-12-17 14:28:21 -05:00
Harrison (Harry) Cramer
9da62d982e Bugfix: Pipeline Job Names w/ Whitespace (#140)
Fix for the pipeline job output where the job name contained whitespace characters. Users will now see the output in a new tab. Support has been added for Windows OS.
2023-12-13 18:51:18 -05:00
Harrison (Harry) Cramer
d5510f9d9a Winbar Support + Notes and Discussions; Help Popup + Auto-Open (#133)
- Adds support for toggling between discussions and notes views
- Deprecates the split view shared with both discussions and notes at the same time
- Adds winbar to discussion split, with metadata about resolved and unresolved discussions
- Adds help popups with information about keybindings for all views
- Modifies highlights in discussion tree and default symbol for unresolved discussions

This is a MINOR version bump as the default behavior of the discussion tree is changed slightly. Existing configurations should still function.
2023-12-13 17:46:34 -05:00
Harrison (Harry) Cramer
d5038d63ca Bugfix: Handle Merge Requests without Changes (#136)
This MR makes the plugin throw the correct error when someone tries to open up the reviewer without any changes
2023-12-10 21:48:09 -05:00
Jakub F. Bortlík
cc68476b15 Make Popups Configurable (#129)
This makes the popups in the plugin (those for editing and creating comments, replies, the pipeline, etc) configurable. Users can change the default width, height, transparency, and border properties, and set overrides per popup.
2023-12-05 08:06:32 -05:00
johnybx
02db3e4b0e Feat: Sort Discussions by File Name (#102)
This MR adds the ability to sort discussions by file name, rather than just by date.

This is an optional configuration that can be passed in on startup. The MR also introduces a test suite for the Lua code that runs through Neovim, so that the plugin can be fully tested with required dependencies and APIs.

Major props to @johnybx for the hard work on this change!
2023-12-04 17:03:32 -05:00
Harrison (Harry) Cramer
93fe3e8bd6 Simplify Go Endpoints + Add Tests (#120)
This MR represents a major refactor of the Go codebase, as well as introducing tests for the handlers. The MR also introduces an endpoint to shutdown or restart the Go server, which may be useful for clients who want to refresh the state of the plugin after checking out branches. Finally, this MR adds a contributing document for users who want to make feature changes.
2023-12-04 10:15:07 -05:00
Mars Peng
10b0b596ae Feat: Support ISO 8601 timestamp with offset (#124)
Fixes timezone offset support to date parsing from Gitlab as specified by the ISO 8601 format
2023-11-28 09:13:49 -05:00
Jakub F. Bortlík
711ed28532 Feat: Add reviewers to summary metadata (#121)
This commit adds reviewers to the metadata panel of the Summary popup. Thank you Jakub Bortlik!
2023-11-21 09:05:18 -05:00
Harrison (Harry) Cramer
c4a3229f16 Feat: Adds More Information to Summary Panel (#100)
This MR adds more information into the summary view, including the MR author, created at date, merge status, draft status, conflicts, and pipeline status, among other things. This is configurable via the setup function.
2023-11-20 18:56:19 -05:00
Harrison (Harry) Cramer
88b9196a2e Feat: Add Basic Lua Test Suite (#115)
This MR adds a Lua test suite to the project, run via busted, and introduces tests for a number of the utility functions. Subsequent work will have to be done to test functions that use the `vim.api` scope and external packages to the plugin.
2023-11-20 18:03:35 -05:00
Harrison (Harry) Cramer
1abc33d149 Feat: Customize Config Path (#117)
Provide the option to configure the location of the `.gitlab.nvim` file
2023-11-20 14:39:22 -05:00
Harrison (Harry) Cramer
b8c386ac6b Bugfix: Updates Diff Hashes (#106)
Rather than using branch names we are using the hashes provided directly in the Gitlab API response, to compare the point at which the branch diverged from the target to the head commit. We are additionally flashing a warning if the MR contains a merge conflict.
2023-11-20 07:19:20 -05:00
Harrison (Harry) Cramer
8a9f8dfc88 Fix: Allows you to open up gitlab.nvim even in nested directories (#107)
This MR is a #patch fix that ensures you can provide a `.gitlab.nvim`
file at the root of the git project and open up the reviewer at any
level of the project.
2023-11-18 16:31:06 -05:00
johnybx
a5d5dc09ef Fixes: Resolve entire discussion thread (#95)
This MR adjusts the comment/discussion resolution action to resolve the entire discussion thread, rather than an individual comment, which is the expected behavior during an MR review.
2023-11-15 08:10:26 -05:00
Daniele Isoni
cd21cdb723 Fixes delete comment default behavior (#97) 2023-11-15 07:20:48 -05:00
Harrison (Harry) Cramer
4c7a610417 Removes un-actionable warning for unknown diagnostic type (#88) 2023-11-13 09:08:54 -05:00
johnybx
58c3dcc9ec Discussion sign and diagnostics (#78)
This MR adds support for in-line comments in the review pane. This allows you to view comments (as diagnostics) directly in the Neovim buffers that you are reviewing. You can then jump to them directly in the discussion tree if you want to reply, edit, and so forth.
2023-11-13 09:06:04 -05:00
Harrison (Harry) Cramer
80b597e56a Feat: Remove Requirement for Dotfile (#84)
This MR removes the requirement for a dotfile (the dotfile is now optional and will override the configuration provided via environment variables). The requirement for providing a project ID is also eliminated, by parsing the namespace and project name from the SSH or HTTPS remote, and then using that to query Gitlab for a matching project.
2023-11-11 23:51:11 -05:00
Harrison (Harry) Cramer
ffdaf83784 BREAKING CHANGE: This is a breaking change, it deprecates the Delta Reviewer (#81)
BREAKING

This is a breaking change which deprecates support for the Delta reviewer. Now, only Diffview is supported.
2023-11-10 17:38:28 -05:00
mrparalon
a032c6434e Fix highlight for usernames (#83)
Changes regular expression for Gitlab usernames.
2023-11-08 13:43:23 -05:00
Harrison (Harry) Cramer
9742b5b229 Feat: Add Color Configuration (#82)
This MR adds the ability to customize colors for the discussion tree
2023-11-07 22:58:03 -05:00
Harrison (Harry) Cramer
6b7e67b325 Fixes #71 (#75)
This MR fixes the check for The `diffview` reviewer. Rather than checking for the presence of the command, we check for the module itself.
2023-10-31 18:46:18 -04:00