Commit Graph

39 Commits

Author SHA1 Message Date
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
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
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
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
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
johnybx
c8a0267ba6 Add option to choose random server port (#65)
Updates the plugin to automatically choose a random port when started when no port is provided. This will allow multiple Neovim instances to open at the same time in different projects.
2023-10-21 11:39:37 -04:00
Harrison (Harry) Cramer
4e473dab7e Feat: Upload Files (#59)
This MR adds the ability to add files to comments, notes, replys, and MR descriptions via a picker.

The file will get uploaded to Gitlab and the filepath will be automatically added into the current popup buffer at the current line. You can then save the changes with the normal save functionality.
2023-09-08 10:02:01 -04:00
Harrison (Harry) Cramer
57b842cad5 Feat: Windows Support (#57)
This MR adds support for Windows machines
2023-09-06 20:25:54 -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
Harrison (Harry) Cramer
e6e0bf4093 Feat: View + Manage Pipeline (#53)
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.
2023-09-03 18:01:54 -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 Cramer
d92cf39dd7 Bugfix: Merge Function
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)
2023-08-29 19:30:46 -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
Harrison Cramer
0ccff54933 Remove unused branch_exists function 2023-08-17 16:24:29 -04:00
Harrison (Harry) Cramer
f5bf720b61 Bugfix: Don't Start Server Right Away (#40)
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.
2023-08-17 16:22:53 -04:00
Harrison (Harry) Cramer
d25c62ae9f Adding Support for Resolving/Unresolving Discussions (#39)
This MR adds the ability to mark discussions as resolved or unresolved. This is important to the review process.
2023-08-17 12:42:36 -04:00
Harrison (Harry) Cramer
844e093294 Add/Remove Reviewers and Assignees (#38)
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.
2023-08-16 21:42:53 -04:00
Harrison (Harry) Cramer
6bb7575c6d Attach UUIDs to Discussion Text (#37)
Three backticks will break the discussion tree, this MR specifically adds custom UUIDs to each text node to avoid this issue.
2023-08-15 23:33:52 -04:00
Harrison (Harry) Cramer
2028be2154 Feat: Edit PR Description (#22)
This MR makes it possible to edit the description. Non-breaking, will happen within the normal description popup.
2023-08-14 20:37:36 -04:00
Harrison (Harry) Cramer
b4077ba8c2 Feat: Discussion Changes + Code Cleanup (#24)
* 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
2023-08-14 17:19:39 -04:00
Harrison (Harry) Cramer
4f0d4b49ef BREAKING CHANGE: Setup refactor and code cleanup
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
2023-08-06 11:23:36 -04:00
Harrison (Harry) Cramer
ade9f81426 Revert "Pull down all non-code notes (#14)" (#15)
This reverts commit f15711edab.
2023-08-04 14:31:55 -04:00
Harrison (Harry) Cramer
f15711edab Pull down all non-code notes (#14)
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.
2023-08-04 14:25:58 -04:00
Harrison (Harry) Cramer
23a21b867b Removed notify as a dependency (#11)
Fixes: https://www.reddit.com/r/neovim/comments/14irqwt/comment/jphw2cx/?utm_source=share&utm_medium=web2x&context=3
2023-06-30 16:35:50 -04:00
Harrison Cramer
f5038656a9 Post MR cleanup (better error handling, comments, etc) 2023-05-20 09:42:00 -07:00
Harrison (Harry) Cramer
63fc025070 Change to HTTP Model (#5) 2023-05-19 17:28:58 -07:00
Harrison Cramer
44323b9a11 Added command to open diffview 2023-04-25 21:54:29 -04:00
Harrison Cramer
55d7bf2d21 Cleaned up commnts and added notify events back 2023-04-25 20:41:04 -04:00
Harrison Cramer
9eb8d08f14 Migrated comment.go to new approach (three API calls) 2023-04-25 20:27:30 -04:00
Harrison Cramer
182575d95a Comments on deleted lines 2023-04-23 17:21:13 -04:00
Harrison Cramer
74309af007 Set up comment to allow for comments on unmodified lines 2023-04-23 14:27:08 -04:00
Harrison (Harry) Cramer
08463c0b84 Develop (#4)
Adds `.gitlab.nvim` configuration file option.
2023-04-22 14:19:12 -04:00
Harrison (Harry) Cramer
6154d4c9f3 Fix Notify Requires (#2)
Moves all notify require calls outside of scheduled calls
2023-04-22 12:52:07 -04:00
Harrison Cramer
bf37b1eae7 Rebased all commits, v0.0.1
added a new file

First major commit

Successful POST of new comment 🚀

Updated README

Updated README 📕

Added more infrastructure

Creating async job

More setup

Getting arguments from Neovim -> Lua -> Golang

Moved commands

Added getProjectInfo command

Adding make comment command

Setting up arguments for MakeComment command

Removed extraneous comments

Setup basic function for adding comments

Lint fixes

Handling bad requests correctly

Better formatting

Printing success message

Adding utility table print

Set comment from popup UI

Added mappings for closing and sending text

Moved popup into separate file

Added comment

Cleaned up code and added approve command

Initialize project information

Removed extraneous import

Don't initialize project in non-gitlab directories

Setup approve command

Set up revoke and approve commands correctly

Cleaned up redundant code

Moved get current branch command

Reorganization of the code

First attempt to add step installing Go binary

Adjusted path to binary

Added install bin check

Do Lua method

Fixed install step

Tweaked binPath + bin

Added basic readme information 📗

Removed .luarc.json file

Adding diffview command

Added string_starts function

Made base branch configurable

Added note to readme

Fixed readme

Added diffview dep to readme

Update README.md

Update README.md

Update README.md

Update README.md

Renamed files

Set up developer workflow

Updated README

Removed dev note

Refactor and moving around files

Fixed ft/after mappings

Setup read command

Added read summary command

Got rid of filetype bindings and set up commands

Set correct filetype for comment buffer

Added read() command to README

Updated review -> summary

Fixed issue with diffview buffers

Added command for getting and showing all comments (out of order)

Better error message

Adding more code to handle showing comments

Added ability to jump from comment to specific changed buffer line

Initial refactor

Added simple comment action

Fixed error message

More cleanup

Fixed bug with M.PROJECT_ID

Leaving comment refactor

Fixed comment

Cleaned up old code

Added missing exit command

Check gitlab repo status before initialization

Better help strings

Added ListDiscussions command

Added Go code

Darkened metadata, filtered out non-real discussions

Removed dummy log

Sort the discussions by most recent activity

Grab hash of current discussion

Wired up reply action in Lua code

Moved to NUI Table

Adding basic jump-to-file ability

More tweaks

Allow jump anywhere in the tree

Ability to reply directly in the buffer window

Jump to location in file

Don't jump if no refresh is set

Cleaned up mappings + other code

Get rid of gitlab CLI dependency

Fixed discussions bug

Don't initialize client on main/master branches

Moved comment into separate module

Moved lua modules into separate files

Modularized library and state

Slightly better error/exception handling

Added license file

Updated readme

Moved into todo.md file

Added todo file

Standardized naming conventions (snake_case in Lua, camelCase in Go)

Moved common popup state into utils folder

Cleaned up keymapping functions

Note on install

Changing bin path

Updated README

Chnaged from success to info

Redirect output to /dev/null on build

Checking install code

Removed print statement

Slight reorganization

Setting up delete comment

Set up confirmation modal

Passing in node ID to delete_comment

Functioning comment deletion

Added delete_comment command

Updated README

Furhter modularized discussion code

Cleaned up and refactored reply code

Update README.md

Added ability to edit comments

Updated todos

Fixed main/master base branch issue

Set up keybinding rules

Updated todo.md

Removed diffview dependency

Slight cleanup 🧹

Trying something out...

Trying something for the binary...

Trying again

Fixed install for non-lazy users

Update README.md

Update README.md

Update README.md

Update README.md

Update README.md
2023-04-21 19:11:53 -04:00