Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking: Deprecate Delta Reviewer #81

Merged
merged 10 commits into from
Nov 10, 2023
Merged

Breaking: Deprecate Delta Reviewer #81

merged 10 commits into from
Nov 10, 2023

Conversation

harrisoncramer
Copy link
Owner

This MR removes the Delta reviewer.

It's my strong hunch that nobody is actually using this, and given that we are now adding features specific to Diffview we should deprecate this reviewer so that folks can have the full experience.

I've added guards into the application to alert users using Delta to switch over to Diffview.

@harrisoncramer
Copy link
Owner Author

@johnybx Would you please review this? Should be a pretty straightforward deprecation of all things Delta.

@@ -38,7 +38,7 @@ M.add_popup = function(type)
table.insert(current_ids, choice.id)
local body = { ids = current_ids }
job.run_job("/mr/" .. type, "PUT", body, function(data)
vim.notify(data.message, vim.log.levels.INFO)
u.notify(data.message, vim.log.levels.INFO)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this prefixes all messages with gitlab.nvim: which is great for usability IMO

@@ -22,10 +22,11 @@ return {
end
server.build() -- Builds the Go binary if it doesn't exist
state.setPluginConfiguration() -- Sets configuration from `.gitlab.nvim` file
state.merge_settings(args) -- Sets keymaps and other settings from setup function

if not state.merge_settings(args) then -- Sets keymaps and other settings from setup function
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the merge_settings function returns false it means there was a fatal error and we do not try to keep running the setup function

This comment was marked as resolved.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my bad I just noticed that message is in function.

Copy link
Contributor

@johnybx johnybx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment but LGTM 👍

@@ -22,10 +22,11 @@ return {
end
server.build() -- Builds the Go binary if it doesn't exist
state.setPluginConfiguration() -- Sets configuration from `.gitlab.nvim` file
state.merge_settings(args) -- Sets keymaps and other settings from setup function

if not state.merge_settings(args) then -- Sets keymaps and other settings from setup function

This comment was marked as resolved.

@@ -1,42 +0,0 @@
-- This Module will pick the reviewer set in the user's
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally would maybe leave this here because it nicely abstracts reviewer, we have control over functions which we use elsewhere in code ( assuming we use only things exposed here ) and it will allow for future extensibility if someone else want to support other reviewers ( or build some kind of plugin ).

What do you think ? ( if you feel like it is bad idea feel free to ignore this 👍 )

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will put it back. No problem, thanks!

@harrisoncramer harrisoncramer merged commit ffdaf83 into main Nov 10, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants