Ir al contenido

Merge trains

Un merge train pone en cola los merge requests hacia una rama de destino y prueba cada uno junto con los que van delante antes de fusionarlo. Estas acciones listan los merge trains de un proyecto o el tren de una rama de destino, leen la entrada de un merge request en el tren y añaden un merge request a su tren.

  • “¿Qué hay en el merge train de main?”
  • “Añade el merge request !15 al merge train”
  • “¿En qué posición del tren está el merge request !15?”
  • Dinámica, la superficie predeterminada: llama a gitlab_execute_action con action igual al ID de la acción, como merge_train.add, y sus parámetros en params. gitlab_find_action encuentra un ID a partir de una descripción de la tarea.
  • Meta (GITLAB_MCP_TOOL_SURFACE=meta): llama a gitlab_merge_train con action igual al nombre de la acción, como add, y sus parámetros en params.
  • Individual (GITLAB_MCP_TOOL_SURFACE=individual): llama a la herramienta propia de la acción, como gitlab_add_merge_request_to_merge_train, pasándole directamente sus parámetros.

Cuántas de estas acciones sirve una instancia en cada nivel, de un total de 4:

  • Free: 0
  • Premium: 4
  • Ultimate: 4

Acciones de solo lectura: 3 de 4, las que conserva un despliegue en modo de solo lectura.

La descripción de cada acción, y la de cada uno de sus parámetros, es el texto que sirve el servidor para ella en la superficie predeterminada, citado tal cual; por eso está en inglés.

AcciónIndividual
merge_train.addgitlab_add_merge_request_to_merge_train
merge_train.getgitlab_get_merge_request_on_merge_train
merge_train.list_branchgitlab_list_merge_request_in_merge_train
merge_train.list_projectgitlab_list_project_merge_trains

Add a merge request to a merge train. Returns: the resulting merge train entries with the merge request, user, pipeline, target branch, status, and duration. See also: merge_train.get, merge_train.list_branch, merge_train.list_project.

  • Meta-herramienta: gitlab_merge_train, acción add
  • Herramienta individual: gitlab_add_merge_request_to_merge_train
  • Nivel: Premium
  • Comportamiento: escribe, no idempotente
ParámetroTipoRequeridoDescripción
merge_request_iidintegersíMerge request internal ID
project_idstring/integersíProject ID or URL-encoded path
auto_mergebooleannoEnable auto-merge when pipeline succeeds
shastringnoHead SHA of the merge request to verify
squashbooleannoSquash commits when merging
when_pipeline_succeedsbooleannoDeprecated in 17.11. Use auto_merge instead. Merge only when the pipeline succeeds

Get the merge train status of a single merge request. Returns: the merge train entry with the merge request, user, pipeline, target branch, status, and duration. See also: merge_train.list_project, merge_train.list_branch, merge_train.add.

  • Meta-herramienta: gitlab_merge_train, acción get
  • Herramienta individual: gitlab_get_merge_request_on_merge_train
  • Nivel: Premium
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
merge_request_iidintegersíMerge request internal ID
project_idstring/integersíProject ID or URL-encoded path

List the merge requests on a merge train for a target branch. Returns: merge train entries with the merge request, user, pipeline, status, duration, and pagination metadata. See also: merge_train.list_project, merge_train.get, merge_train.add.

  • Meta-herramienta: gitlab_merge_train, acción list_branch
  • Herramienta individual: gitlab_list_merge_request_in_merge_train
  • Nivel: Premium
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
project_idstring/integersíProject ID or URL-encoded path
target_branchstringsíTarget branch name
order_bystringnoColumn to order results by (keyset pagination)
pageintegernoPage number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward.
page_tokenstringnoKeyset pagination cursor: record id at which to fetch the next page, taken from the previous keyset response. Only used when pagination=‘keyset’.
paginationstringnoPagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost.
per_pageintegernoItems per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large.
scopestring (active, complete)noFilter by scope: active, complete
sortstring (asc, desc)noSort order: asc or desc

List all merge trains in a project. Returns: merge train entries with the merge request, user, pipeline, target branch, status, duration, and pagination metadata. See also: merge_train.list_branch, merge_train.get, merge_train.add.

  • Meta-herramienta: gitlab_merge_train, acción list_project
  • Herramienta individual: gitlab_list_project_merge_trains
  • Nivel: Premium
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
project_idstring/integersíProject ID or URL-encoded path
order_bystringnoColumn to order results by (keyset pagination)
pageintegernoPage number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward.
page_tokenstringnoKeyset pagination cursor: record id at which to fetch the next page, taken from the previous keyset response. Only used when pagination=‘keyset’.
paginationstringnoPagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost.
per_pageintegernoItems per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large.
scopestring (active, complete)noFilter by scope: active, complete
sortstring (asc, desc)noSort order: asc or desc