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.
Preguntas de ejemplo
Sección titulada «Preguntas de ejemplo»- “¿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?”
Cómo llamarlo
Sección titulada «Cómo llamarlo»- Dinámica, la superficie predeterminada: llama a
gitlab_execute_actionconactionigual al ID de la acción, comomerge_train.add, y sus parámetros enparams.gitlab_find_actionencuentra un ID a partir de una descripción de la tarea. - Meta (
GITLAB_MCP_TOOL_SURFACE=meta): llama agitlab_merge_trainconactionigual al nombre de la acción, comoadd, y sus parámetros enparams. - Individual (
GITLAB_MCP_TOOL_SURFACE=individual): llama a la herramienta propia de la acción, comogitlab_add_merge_request_to_merge_train, pasándole directamente sus parámetros.
Disponibilidad
Sección titulada «Disponibilidad»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.
Acciones
Sección titulada «Acciones»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ón | Individual |
|---|---|
merge_train.add | gitlab_add_merge_request_to_merge_train |
merge_train.get | gitlab_get_merge_request_on_merge_train |
merge_train.list_branch | gitlab_list_merge_request_in_merge_train |
merge_train.list_project | gitlab_list_project_merge_trains |
merge_train.add
Sección titulada «merge_train.add»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ónadd - Herramienta individual:
gitlab_add_merge_request_to_merge_train - Nivel: Premium
- Comportamiento: escribe, no idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
merge_request_iid | integer | sí | Merge request internal ID |
project_id | string/integer | sí | Project ID or URL-encoded path |
auto_merge | boolean | no | Enable auto-merge when pipeline succeeds |
sha | string | no | Head SHA of the merge request to verify |
squash | boolean | no | Squash commits when merging |
when_pipeline_succeeds | boolean | no | Deprecated in 17.11. Use auto_merge instead. Merge only when the pipeline succeeds |
merge_train.get
Sección titulada «merge_train.get»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ónget - Herramienta individual:
gitlab_get_merge_request_on_merge_train - Nivel: Premium
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
merge_request_iid | integer | sí | Merge request internal ID |
project_id | string/integer | sí | Project ID or URL-encoded path |
merge_train.list_branch
Sección titulada «merge_train.list_branch»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ónlist_branch - Herramienta individual:
gitlab_list_merge_request_in_merge_train - Nivel: Premium
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
project_id | string/integer | sí | Project ID or URL-encoded path |
target_branch | string | sí | Target branch name |
order_by | string | no | Column to order results by (keyset pagination) |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
page_token | string | no | Keyset pagination cursor: record id at which to fetch the next page, taken from the previous keyset response. Only used when pagination=‘keyset’. |
pagination | string | no | Pagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost. |
per_page | integer | no | Items per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large. |
scope | string (active, complete) | no | Filter by scope: active, complete |
sort | string (asc, desc) | no | Sort order: asc or desc |
merge_train.list_project
Sección titulada «merge_train.list_project»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ónlist_project - Herramienta individual:
gitlab_list_project_merge_trains - Nivel: Premium
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
project_id | string/integer | sí | Project ID or URL-encoded path |
order_by | string | no | Column to order results by (keyset pagination) |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
page_token | string | no | Keyset pagination cursor: record id at which to fetch the next page, taken from the previous keyset response. Only used when pagination=‘keyset’. |
pagination | string | no | Pagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost. |
per_page | integer | no | Items per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large. |
scope | string (active, complete) | no | Filter by scope: active, complete |
sort | string (asc, desc) | no | Sort order: asc or desc |