Feat: Make MR title input window configurable (#174)
Feat: Make MR title input window configurable
This commit is contained in:
@@ -211,6 +211,10 @@ require("gitlab").setup({
|
|||||||
create_mr = {
|
create_mr = {
|
||||||
target = nil, -- Default branch to target when creating an MR
|
target = nil, -- Default branch to target when creating an MR
|
||||||
template_file = nil, -- Default MR template in .gitlab/merge_request_templates
|
template_file = nil, -- Default MR template in .gitlab/merge_request_templates
|
||||||
|
title_input = { -- Default settings for MR title input window
|
||||||
|
width = 40,
|
||||||
|
border = "rounded",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
colors = {
|
colors = {
|
||||||
discussion_tree = {
|
discussion_tree = {
|
||||||
|
|||||||
@@ -246,6 +246,10 @@ you call this function with no values the defaults will be used:
|
|||||||
create_mr = {
|
create_mr = {
|
||||||
target = nil, -- Default branch to target when creating an MR
|
target = nil, -- Default branch to target when creating an MR
|
||||||
template_file = nil, -- Default MR template in .gitlab/merge_request_templates
|
template_file = nil, -- Default MR template in .gitlab/merge_request_templates
|
||||||
|
title_input = { -- Default settings for MR title input window
|
||||||
|
width = 40,
|
||||||
|
border = "rounded",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
colors = {
|
colors = {
|
||||||
discussion_tree = {
|
discussion_tree = {
|
||||||
|
|||||||
@@ -78,18 +78,6 @@ local description_popup_settings = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
local title_input_options = {
|
|
||||||
position = "50%",
|
|
||||||
relative = "editor",
|
|
||||||
size = 40,
|
|
||||||
border = {
|
|
||||||
style = "rounded",
|
|
||||||
text = {
|
|
||||||
top = "Title",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
---1. If the user has already begun writing an MR, prompt them to
|
---1. If the user has already begun writing an MR, prompt them to
|
||||||
--- continue working on it.
|
--- continue working on it.
|
||||||
---@param args? Args
|
---@param args? Args
|
||||||
@@ -186,7 +174,17 @@ end
|
|||||||
---4. Prompts the user for the title of the MR
|
---4. Prompts the user for the title of the MR
|
||||||
---@param mr Mr
|
---@param mr Mr
|
||||||
M.add_title = function(mr)
|
M.add_title = function(mr)
|
||||||
local input = Input(title_input_options, {
|
local input = Input({
|
||||||
|
position = "50%",
|
||||||
|
relative = "editor",
|
||||||
|
size = state.settings.create_mr.title_input.width,
|
||||||
|
border = {
|
||||||
|
style = state.settings.create_mr.title_input.border,
|
||||||
|
text = {
|
||||||
|
top = "Title",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}, {
|
||||||
prompt = "",
|
prompt = "",
|
||||||
default_value = "",
|
default_value = "",
|
||||||
on_close = function() end,
|
on_close = function() end,
|
||||||
|
|||||||
@@ -81,6 +81,10 @@ M.settings = {
|
|||||||
create_mr = {
|
create_mr = {
|
||||||
target = nil,
|
target = nil,
|
||||||
template_file = nil,
|
template_file = nil,
|
||||||
|
title_input = {
|
||||||
|
width = 40,
|
||||||
|
border = "rounded",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
info = {
|
info = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
|
|||||||
Reference in New Issue
Block a user