[Feature]: Enable setting `create_mr.title` in as function in `setup` options
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu với tài liệu thiết lập trong doc/gitlab.nvim.txt và lần theo các entry point require(\"gitlab\").setup và create_mr được mô tả trong issue. Công việc được xem là hoàn tất khi settings.create_mr.title chấp nhận một chuỗi hoặc hàm Lua và chuỗi tạo ra được dùng làm tiêu đề của GitLab Merge Request.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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!
- Ngôn ngữ chính
- Lua
- Star
- 401
- Fork
- 64
- Merge trung bình
- 7 giờ 17 phút
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của harrisoncramer/gitlab.nvim
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
harrisoncramer/gitlab.nvim#585 · 1 bình luận ·
-
Security/Bug: Go server leaks auth_token to ps and leaves zombie processesCó thể đã có người làm @jakubbortlik đã nhận 14 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 46/100
harrisoncramer/gitlab.nvim#583 · 2 bình luận · 1 người được giao ·
-
Oauth Login the pluginCó thể làm lại được @vamshi567bh đã nhận 254 ngày trước và không có pull request nào đang mở. Đang mởfeature request
harrisoncramer/gitlab.nvim#515 · 2 bình luận · 1 người được giao ·
-
toggle_discussions() doesn't open new window - draft_notes error 404Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
harrisoncramer/gitlab.nvim#507 · 1 bình luận ·
-
Support for custom Gitlab URLsĐang mởfeature request
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
harrisoncramer/gitlab.nvim#505 · 6 bình luận ·
Tất cả issue của harrisoncramer/gitlab.nvim
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
jellyfin/jellyfin-mpv-shim#800 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-research-finding bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jordansmall/nixvim-config#99 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Support listchars leadtabĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
xmake-io/xmake#7822 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
LazyVim/LazyVim#7270 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày