51 Commits
Author SHA1 Message Date
Harrison Cramer 3d2828a950 feat!: MAJOR release. Update go to 1.25, and add migration path (#520)
BREAKING CHANGE: This bumps Go and external packages to later versions.
2026-01-30 21:54:00 -05:00
Harrison Cramer 35f0903088 Fix layout issues 2023-09-11 09:31:16 -04:00
Harrison Cramer c8c7d86e84 Bugfix: We must allow most actions to occur after the popup closes.
Some (like editing the title and description) need the popup text and
should execute prior to closure. This is now configurable via an options
table that can be passed to the set_popup_keymaps function.
2023-09-08 20:46:38 -04:00
Harrison Cramer 25bce625fc Allow editing title 2023-09-08 20:22:57 -04:00
Harrison Cramer 45329f4d69 Bugfix: Fix build, missing relative path 2023-09-08 09:44:00 -04:00
Harrison Cramer f05b6f128b Feat: Adds open_in_browser() command to open MR in browser 2023-09-07 20:40:30 -04:00
Harrison Cramer ad3203c214 Bugfix: Account for empty setup calls 2023-09-06 10:35:07 -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 Cramer ac2118ceb6 Bugfix: Force binary rebuild
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
2023-09-04 11:46:06 -04:00
Harrison Cramer 4c6dcacfcd Added notification for created comments/notes 2023-09-01 10:00:48 -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 Cramer 72a263d346 Bugfix: Fixes server.start() command 2023-08-28 08:25:30 -04:00
Harrison Cramer c29fa4f43f Bugfix: Fixed default state 2023-08-28 08:21:31 -04:00
Harrison Cramer ce5dd1aaa2 Fixes #28
We do not want to attempt to refresh the discussion tree if the buffer has been
deleted.
2023-08-18 21:38:27 -04:00
Harrison Cramer 16ed361333 Added lots of comments and documentation 📘 2023-08-18 19:23:44 -04:00
Harrison Cramer 2846dd3239 Slight cleanup + simplification of init state 2023-08-18 19:23:44 -04:00
Harrison Cramer 8c9d46ceb5 Broke require("gitlab").start_server() command into separate function
This will make debugging easier!
2023-08-17 17:13:35 -04:00
Harrison Cramer 14bb2800e5 Remove branch logic 2023-08-17 16:35:55 -04:00
Harrison Cramer 0ccff54933 Remove unused branch_exists function 2023-08-17 16:24:29 -04:00
Harrison Cramer 146d7d3936 Updated issue templates 2023-08-15 08:26:26 -04:00
Harrison Cramer 0a4ce10aa1 Removed extra log 2023-08-14 17:59:40 -04:00
Harrison Cramer 97195d4ab5 Feat: Configure discussion tree split width and position
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.
2023-08-12 14:36:48 -04:00
Harrison Cramer e958b35bd5 Minor comment changes in init.lua 2023-08-12 13:12:54 -04:00
Harrison Cramer feff814b56 Bugfix: State Initialization
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
2023-08-12 13:07:04 -04:00
Harrison Cramer 7e4ca89198 Expose state for debugging purposes
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
```
2023-08-11 21:05:31 -04:00
Harrison Cramer 3d3bb764ba Bugfix: The job might not return JSON data, so we don't need to throw
here
2023-08-09 17:30:36 -04:00
Harrison Cramer 6ab8cfdc55 Bugfix: Shows error on failed startup (adds on_stderr handler) 2023-08-06 22:03:02 -04:00
Harrison Cramer 5f5f5d63c0 Bugfix: Fixed issue with JSON marshalling/unmarshalling 2023-08-06 15:30:17 -04:00
Harrison Cramer 68f27e5dc1 Use job wrapper for INFO call 2023-08-06 14:56:00 -04:00
Harrison Cramer 22389fdb3d BUGFIX: Don't error when there are no discussions for an MR, just alert
the user
2023-08-04 12:25:39 -04:00
Harrison Cramer 2f60984c90 BUGFIX: Fix Error Notifications
These errors need to be wrapped in a delay call in order to actually
work, otherwise we run into this error: https://www.reddit.com/r/neovim/comments/qz4wy6/how_can_i_do_this/
2023-08-03 10:22:49 -04:00
Harrison Cramer 74afe95d0e BUGFIX: Don't try to start server when on main branch 2023-08-03 09:55:19 -04:00
Harrison Cramer b9538b1ce6 BUGFIX: Show all merge requests
We do not want to show only merge requests created by the current user,
   we want to show all merge requests for the current branch created by
   anyone.
2023-08-03 09:43:52 -04:00
Harrison Cramer b105e83f98 Updated readme 2023-05-20 09:54:13 -07:00
Harrison Cramer bf5da3e3e4 Added build binary 2023-05-20 09:53:23 -07:00
Harrison Cramer f5038656a9 Post MR cleanup (better error handling, comments, etc) 2023-05-20 09:42:00 -07:00
Harrison Cramer 27ec4668c1 Modified project_id logic to require .gitlab.nvim file 2023-05-19 18:20:16 -07:00
Harrison Cramer ca7c702fd0 Added port to job function 2023-05-19 17:36:37 -07:00
Harrison Cramer fe0d09d582 Updated todo.md file 2023-04-25 22:50:16 -04:00
Harrison Cramer 2a249cdf27 Line number set (either new_line or old_line) 2023-04-25 21:59:44 -04: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 1ce0c56121 Made comment code sequential to avoid multiple comments 2023-04-25 20:38:22 -04:00
Harrison Cramer 9eb8d08f14 Migrated comment.go to new approach (three API calls) 2023-04-25 20:27:30 -04:00
Harrison Cramer c2f1eb2b5b Finally fixed commenting on deletions 2023-04-23 19:02:37 -04:00
Harrison Cramer c479daa5fb Fixed comments for deleted lines 2023-04-23 18:56:39 -04:00
Harrison Cramer 182575d95a Comments on deleted lines 2023-04-23 17:21:13 -04:00
Harrison Cramer b0cdc5dd88 Don't error when there are no discussions 2023-04-23 14:32:19 -04:00
Harrison Cramer 74309af007 Set up comment to allow for comments on unmodified lines 2023-04-23 14:27:08 -04:00
Harrison Cramer 3cd7f1db06 Added plenary to readme 2023-04-22 00:12:25 -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