Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 49,664
    • Issues 49,664
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,565
    • Merge requests 1,565
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #328650
Closed
Open
Issue created Apr 21, 2021 by Jackie Porter@jreporterDeveloper

API Support to add an MR to the Merge Train

Release Notes

Merge Trains give you the ability to add a Merge Request to a Merge Train and trust that you do not have to worry about a broken build on /main. Adding an MR to the train has had to be a manual action for developers which works if you primarily operate in in the GitLab UI but does not support CI/CD Automation or other flows that some organizations prefer.

Now you can utilize the GitLab API to add a Merge Request to a Merge Train.

Problem to solve

Our merge request API hasn't been updated to support our merge trains feature and public API support is lacking in Merge Train. This means, users cannot automate their workflow via API. Today, users can control via UI, which is manual operation.

Intended users

  • Sasha (Software Developer)

Proposal

Mirror the changes we made to our internal API in order to support merge trains: gitlab-foss!28595 (merged). Instead of sending a request to the /merge endpoint with merge_when_pipeline_succeeds: true, the endpoint would instead accept a auto_merge_strategy parameter with any of the following values:

  • merge_train

Permissions and Security

There are no special considerations from a permissions/security standpoint.

Documentation

The section of our documentation that would be most affected by this change would be the Accept MR API.

The Get single MR endpoint may also need to be updated, depending on our implementation.

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited Jan 11, 2023 by James Heimbuck
Assignee
Assign to
Time tracking