Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#516 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
lua
Ambito
tooling

Direzione di ricerca

Inizia dalla documentazione di configurazione in doc/gitlab.nvim.txt e segui gli entry point require(\"gitlab\").setup e create_mr descritti nell'issue. Il lavoro è completato quando settings.create_mr.title accetta una stringa o una funzione Lua e la stringa risultante viene usata per il titolo del GitLab Merge Request.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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!

Lingua principale
Lua
Stelle
401
Fork
64
Merge medio
7h 17m
PR unite (30g)
4

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di harrisoncramer/gitlab.nvim

Tutte le issue di harrisoncramer/gitlab.nvim

Issue simili

Altre issue su Lua

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.