Commit Graph

35 Commits

Author SHA1 Message Date
Harrison (Harry) Cramer
e29909cd10 Bugfixes, Etc. (#502)
* Fix: Jumping to renamed files (#484)

* fix: prevent "cursor position outside buffer" error

* fix: swap file_name and old_file_name in reviewer data

`old_file_name` is not set to the empty string for un-renamed files anymore, because then we can
remove the empty-line check in `comment_helpers.go` which was used to replace the empty string with
the current file name anyway.

* fix: add old_file_name to discussion root node data

* fix: also consider old_file_name when jumping to the reviewer

This fixes jumping to renamed files, however, may not work for comments that
were created on renamed files with the previous version of `gitlab.nvim` as
that version assigned the `file_name` and `old_file_name` incorrectly.

* refactor: don't shadow variable

* fix: check file_name or old_file_name based on which SHA comment belongs to

* Fix: Store reviewer data before creating comment popup (#476)

* Fix: Make publishing drafts more robust (#483)

* Fix: Swap file_name and old_file_name in reviewer data (#485)

* Feat: Enable toggling date format between relative and absolute (#491)

* Fix: Add opts to help popup (#492)

* Fix: Force start_line for jumping to diagnostic to be inside buffer (#494)

* fix: redefine colors after reloading colorscheme (#500)

* Fix: Use path instead of oldpath as fallback for unrenamed files (#496)

* Fix: Use file_name when old_file_name is not set (#495)

* fix(ci): fix lua tests (#501)

* Proxy Support (#499)

This is a #MINOR release.

---------

Co-authored-by: Jakub F. Bortlík <jakub.bortlik@proton.me>
Co-authored-by: Jonathan Duck <Duckbrain30@gmail.com>
2025-06-24 20:53:51 -04:00
Harrison (Harry) Cramer
a260f648fe Release (#490)
Fix: Jumping to renamed files (#484)
Fix: Store reviewer data before creating comment popup (#476)
Fix: Make publishing drafts more robust (#483)
Fix: Swap file_name and old_file_name in reviewer data (#485)

---------

Co-authored-by: Jakub F. Bortlík <jakub.bortlik@proton.me>
2025-04-14 17:51:53 -04:00
Harrison (Harry) Cramer
9f898aa1a8 Bug Fixes (#470)
* fix: Restore buffer local settings outside reviewer (#446)
* fix: do not show healthcheck alert for warnings (#468)
* feat: Add MR URL to the summary details (#467)
* fix: make cycling reviewed files faster (#474)
* feat(pipeline): display trigger jobs for a pipeline in the pipelines popup  (#465)
* fix: Jumping to renamed files (#484)

---------

Co-authored-by: Jakub F. Bortlík <jakub.bortlik@proton.me>
Co-authored-by: Ashish Alex <ashish.alex10@gmail.com>
2025-03-01 13:28:02 -05:00
Harrison (Harry) Cramer
3b396a5e6b Release: Docs Improvements and Bug Fixes (#460)
Miscellaneous bug fixes and improvements.

docs: various improvements (#445)
fix: don't jump to file from reviewer if it doesn't exist (#452)
fix: force linewise motion in suggestion keybinding (#454)
fix: prevent error after plenary job update (#456)
fix: fix JSON on Windows (#458)
fix: remove retry logic (#449)
fix: check whether comment can be created (#434)
2025-01-18 11:22:24 -05:00
Harrison (Harry) Cramer
495e64c8bc Release (#440)
* Feat: Enable sorting discussions by original comment (#422)
* Feat: Improve popup UX (#426)
* Feat: Automatically update MR summary details (#427)
* Feat: Show update progress in winbar (#432)
* Feat: Abbreviate winbar (#439)
* Fix: Note Creation Bug (#441)
* Fix: Checking whether comment can be created (#434)
* Fix: Syntax in discussion tree (#433)
* fix: improve indication of resolved threads and drafts (#442)
* Docs: Various minor improvements (#445)

---------

Co-authored-by: Jakub F. Bortlík <jakub.bortlik@proton.me>
2024-12-11 14:21:50 -05:00
Harrison (Harry) Cramer
be027331e1 Miscellaneous Bug Fixes (#423)
fix: Show non-resolvable notes in winbar (#417)
fix: add more emojis and make emoji picker configurable (#414)
fix: comment creation should not be possible for renamed and moved files (#416)
fix: color highlight groups are invalid (#421)
fix: plugin failing to build on Windows (#419)

---------

Co-authored-by: Jakub F. Bortlík <jakub.bortlik@proton.me>
2024-11-12 11:01:28 -05:00
Harrison (Harry) Cramer
341d56a1cb 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>
2024-10-13 15:20:43 -04:00
Harrison (Harry) Cramer
38bde8a0e4 Bug Fixes (#382)
* fix: error messages and run all tests (#381)
* feat: Automatically open fold under cursor (#380)
* fix: discussion ID is not required (#383)

This is a #PATCH release.

---------

Co-authored-by: George Kontridze <george.kontridze@gmail.com>
Co-authored-by: Jakub F. Bortlík <jakub.bortlik@proton.me>
2024-09-26 10:11:48 -04:00
Harrison (Harry) Cramer
22bfd0c83e fix: date fixes; go middleware refactors; regex fixes; etc (#368)
fix: format of date when MR was closed or merged (#367)
refactor: Add Payload Validators + Middleware In Go Code (#366)
fix: Add better checks for leaving comments (#369)
fix: regex support for http credentials embedded in remote url (#372)
fix: Comment on single line selects two lines (#371)

This is a #PATCH release.
2024-09-14 16:53:00 -04:00
Harrison (Harry) Cramer
ea2b2b2f5c Fix MR Selection, Go Code Refactor (#358)
refactor: Refactors the Go codebase into a more modular and idiomatic approach
fix: require selection of specific MR when there are multiple targets for a given source branch
feat: Allows for the passing of Gitlab's filter options when choosing an MR, improves MR selection
feat: API to choose an MR from a list based on the provided username's involvement as an assignee/reviewer/author

This is a #MINOR release
2024-09-08 16:45:09 -04:00
Harrison (Harry) Cramer
6500ef1f2c Popup and Keymap Updates (#356)
feat: Enable always jumping to discussion tree (#352)
feat: Enables motions for easier range selection when creating comments/suggestions (e.g. s3j, c3j) (#353)
fix: Makes help popup not editable and close it on BufLeave (#355)

This is a #MINOR release
2024-09-05 14:00:01 -04:00
Harrison (Harry) Cramer
9fc47bd3bc feat!: Implements default keybindings for all actions.
This is a breaking change to the way the plugin is configured. If users are using the old configuration the plugin will warn them which fields have been removed in their configuration. Old keybindings can be found here: https://github.com/harrisoncramer/gitlab.nvim/pull/340#issuecomment-2282756924 (#331)

feat: Customize discussion tree chevrons (#339)
2024-08-11 22:29:08 -04:00
Harrison (Harry) Cramer
cf6ccddce3 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>
2024-04-22 16:56:27 -04:00
Harrison (Harry) Cramer
f906af0c3a Release (#256)
* fix: Jumping to wrong buffer (#261)
* fix: Go to last line and show warning when diagnostic is past the end of buffer (#262)
* fix: Get recent pipeline through other means (#266)
* feat: Add keymaps and linewise actions to layouts (#265)

This is a #MINOR release, because we are introducing new keybindings for the comment/note popups.

---------

Co-authored-by: Jakub F. Bortlík <jakub.bortlik@proton.me>
Co-authored-by: sunfuze <sunfuze.1989@gmail.com>
2024-04-15 09:56:21 -04: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
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
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
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
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
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
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
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
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
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
Harrison (Harry) Cramer
a055c4c988 Adds Formatting to the CI (#69)
This MR adds linting and formatting to the CI pipeline for the repository for both the Golang and Lua code.
2023-10-30 23:54:38 -04:00
johnybx
3a67424fec Multiline comment and suggestion (#66)
This MR adds the ability to leave multi-line comments and suggested changes to an MR. The features are only supported for `diffview` because we plan to deprecate `delta` as a reviewer soon.
2023-10-30 21:58:53 -04:00
Harrison Cramer
4792e03416 Follow-up: Require Different Reviewers
This plugin previously only supported the Delta reviewer. Thanks to work
from @mrparalon it now supports Diffview also. This MR adjusts the
requirements to account for this, and the README.

It also addresses a small bug in the original implementation regarding
an async file opening action, and applies formatting to the diffview
file consistent with the rest of the project
2023-09-05 10:22:19 -04:00
mrparalon
a2bd0749f0 Diffview support (#56)
This MR adds support for diffview as a reviewer. I'll update the README and some other checks for Delta in a followup MR.
2023-09-05 09:44:03 -04:00
Harrison (Harry) Cramer
152c55fd57 Feat: Notes (Non-Linked Comments) (#52)
Adds support for notes. These are comments that are not linked to specific lines of code in the MR.
2023-08-31 21:36:40 -04:00
Harrison (Harry) Cramer
19468a3d2d BREAKING CHANGE: Delta Pager + Large Refactor (#43)
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.
2023-08-27 17:26:54 -04:00