Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Feature]: Enable setting `create_mr.title` in as function in `setup` options

Open
#516 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
lua
Domain
tooling

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

feature request

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.

  1. To allow users to configure settings.create_mr.title within the setup options and
  2. To allow users to provide a lua function 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from harrisoncramer/gitlab.nvim

All issues in harrisoncramer/gitlab.nvim

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.