[Feature]: Enable setting `create_mr.title` in as function in `setup` options
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with the doc/gitlab.nvim.txt setup documentation and trace the require("gitlab").setup and create_mr entry points described in the issue. Done means settings.create_mr.title accepts a string or Lua function and the resulting string is used for the GitLab Merge Request title.
Written by the indexing model from the issue text.
Description
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!
- Dominant language
- Lua
- Stars
- 401
- Forks
- 64
- Avg merge
- 7h 17m
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from harrisoncramer/gitlab.nvim
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
harrisoncramer/gitlab.nvim#585 · 1 comment ·
-
Security/Bug: Go server leaks auth_token to ps and leaves zombie processesPossibly taken @jakubbortlik claimed this 12 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 46/100
harrisoncramer/gitlab.nvim#583 · 2 comments · 1 assignee ·
-
Oauth Login the pluginMay be free again @vamshi567bh claimed this 253 days ago, and no pull request is open. Openfeature request
harrisoncramer/gitlab.nvim#515 · 2 comments · 1 assignee ·
-
toggle_discussions() doesn't open new window - draft_notes error 404Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
harrisoncramer/gitlab.nvim#507 · 1 comment ·
-
feature request
Difficulty 3/5 1-2 days Newbie friendliness 56/100
harrisoncramer/gitlab.nvim#505 · 6 comments ·
All issues in harrisoncramer/gitlab.nvim
Similar issues
-
agent-butler-finding chore
Difficulty 1/5 Under an hour Newbie friendliness 92/100
codymikol/multiverse.nvim#372 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
fabriziosalmi/wildbox#647 ·
Maintainers usually reply within 1 day
-
bug(cosh): copilot-shell postun erase guard never fires (arg index)Possibly taken @yyqdbngt claimed this 1 day ago. Opencomponent:cosh
Difficulty 1/5 Under an hour Newbie friendliness 91/100
agentic-os-org/ANOLISA#4490 · 1 comment ·
Maintainers usually reply within 1 day
-
1.severity: security
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
NixOS/nixpkgs#569828 · 1 reaction ·
Maintainers usually reply within 1 day
-
setup annotation treats all default settings as requiredPossibly taken @oriori1703 claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
mason-org/mason.nvim#2114 ·