Skip to content

Merge trains GET merge request API

What does this MR do and why?

Creates a GET API endpoint for merge trains. This returns all of the merge train cars aimed at the target branch. Merge trains are a premium feature so this is intended to also be a premium feature.

GET /projects/:id/merge_trains/merge_requests/:merge_request_iid

This MR models the API structure as as described in: !100853 (comment 1145074169)

This MR is related to the Epic: &5864

Be aware of future changes from: #298541 (closed)

Related MRs for this API Bundle

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

  1. Run gitlab in premium mode
  2. Request the API with GET /projects/:id/merge_trains/merge_requests/:merge_request_iid

To get more interesting responses from the API:

  1. Create a project
  2. Add merge requests to the project
  3. Add the merge requests to the merge train
  4. Request the API with GET /pojects/:id/merge_trains/merge_request/:merge_request_iid

Example Usage:

curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/:id/merge_trains/merge_requests/:merge_request_iid"

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Markus Ferrell

Merge request reports