[Feature]: Enable setting `create_mr.title` in as function in `setup` options
还没有人认领这个 Issue。
评估
调研方向
从 doc/gitlab.nvim.txt 中的设置文档开始,跟踪 issue 中描述的 require(\"gitlab\").setup 和 create_mr 入口点。当 settings.create_mr.title 接受字符串或 Lua 函数,并将生成的字符串用作 GitLab Merge Request 标题时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Thanks for gitlab.nvim! Just started using this plugin today and I think it will be incredibly useful for my workflow.
Feature Description
After referencing :h gitlab.nvim, I can see that we can set the title for Merge Requests using require("gitlab").create_mr({ title = "Fix bug XYZ", description = "Closes #123" }), but we cannot set MR titles in the setup options.
This makes sense, because it would rarely be useful to always use the same title for every Merge Request, but I think it would be a useful option if not only users were able to also set settings.create_mr.title within our setup configuration to gitlab.nvim, but we were able to set the title by providing a function that will be called to generate the title - so this is sort of 2 feature requests.
- To allow users to configure
settings.create_mr.titlewithin thesetupoptions and - To allow users to provide a
luafunction to this property, that, when called will return a string that can be used for the GitLab MR.
Ideal Behavior
return {
"harrisoncramer/gitlab.nvim",
dependencies = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim",
"sindrets/diffview.nvim",
"stevearc/dressing.nvim",
"nvim-tree/nvim-web-devicons",
},
build = function()
require("gitlab.server").build(true)
end, -- Builds the Go binary
config = function()
require("gitlab").setup({
create_mr = {
target = "main",
template_file = "Default.md",
title = function()
-- My complicated function that will use some runtime logic to return a string to use for MR title
return "foo(bar): baz"
end,
},
})
end,
}
Thanks again!
- 主要语言
- Lua
- 星标
- 404
- 派生
- 64
- 平均合并
- 4 天 5 小时
- 30 天内合并 PR
- 6
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
harrisoncramer/gitlab.nvim 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
harrisoncramer/gitlab.nvim#585 · 1 条评论 ·
-
Security/Bug: Go server leaks auth_token to ps and leaves zombie processes可能已有人在做 @jakubbortlik 于 26 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 46/100
harrisoncramer/gitlab.nvim#583 · 2 条评论 · 已指派 1 人 ·
-
Oauth Login the plugin可能重新可做 @vamshi567bh 于 267 天前认领,目前没有进行中的 PR。 未关闭feature request
harrisoncramer/gitlab.nvim#515 · 2 条评论 · 已指派 1 人 ·
-
toggle_discussions() doesn't open new window - draft_notes error 404可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 25/100
harrisoncramer/gitlab.nvim#507 · 1 条评论 ·
-
feature request
难度 3/5 1-2 天 新手友好度 56/100
harrisoncramer/gitlab.nvim#505 · 6 条评论 ·
查看 harrisoncramer/gitlab.nvim 的全部 Issue
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 75/100
dense-analysis/ale#5174 ·
-
难度 2/5 1-3 小时 新手友好度 66/100
LuaLS/lua-language-server#3477 ·
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
Bug Forever Module - Tooltips
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
jitsi/jitsi-meet#18020 ·
维护者通常 1 天内回复