Skip to content

Feat/merge trains additional #2547#3381

Open
isaac-philip wants to merge 12 commits intopython-gitlab:mainfrom
isaac-philip:feat/merge_trains_additional_update
Open

Feat/merge trains additional #2547#3381
isaac-philip wants to merge 12 commits intopython-gitlab:mainfrom
isaac-philip:feat/merge_trains_additional_update

Conversation

@isaac-philip
Copy link
Copy Markdown

  1. Status of Merge Request on Merge Train
  2. Add Merge Request to Merge Train

closes #2547

…dd mr

Signed-off-by: Isaac Philip <4974658+isaac-philip@users.noreply.github.com>
…dd mr - test data modifications

Signed-off-by: Isaac Philip <4974658+isaac-philip@users.noreply.github.com>
…dd mr - minor changes

Signed-off-by: Isaac Philip <4974658+isaac-philip@users.noreply.github.com>
…dd mr - lint formatted by black

Signed-off-by: Isaac Philip <4974658+isaac-philip@users.noreply.github.com>
…dd mr - docs added

Signed-off-by: Isaac Philip <4974658+isaac-philip@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.77%. Comparing base (0e8ae57) to head (c06ded2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3381      +/-   ##
==========================================
+ Coverage   95.75%   95.77%   +0.01%     
==========================================
  Files         100      100              
  Lines        6125     6152      +27     
==========================================
+ Hits         5865     5892      +27     
  Misses        260      260              
Flag Coverage Δ
api_func_v4 83.64% <70.58%> (-0.10%) ⬇️
cli_func_v4 78.51% <70.58%> (-0.07%) ⬇️
unit 90.29% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
gitlab/base.py 100.00% <100.00%> (ø)
gitlab/mixins.py 91.64% <100.00%> (+0.13%) ⬆️
gitlab/v4/objects/merge_trains.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@isaac-philip
Copy link
Copy Markdown
Author

@JohnVillalovos kindly have a look for same set of changes with earlier MR rebased on latest. thanks.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for GitLab’s merge train merge-request endpoints (MR status on merge train + adding an MR to a merge train) to python-gitlab, along with unit tests and docs, addressing issue #2547.

Changes:

  • Extend ProjectMergeTrainManager to support get() and add a nested merge_requests manager for merge train MR status/add-to-train endpoints.
  • Add unit tests covering merge train listing, MR status retrieval, and adding an MR to a merge train.
  • Document the new merge train MR classes/managers and provide usage examples.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
gitlab/v4/objects/merge_trains.py Adds merge train MR REST object + manager; enables get() on merge trains.
gitlab/v4/objects/projects.py Adjusts import for merge trains manager (lint-sensitive).
tests/unit/objects/test_merge_trains.py Adds fixtures and tests for new merge train MR endpoints.
docs/gl_objects/merge_trains.rst Documents new merge train MR objects/managers and examples.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@isaac-philip
Copy link
Copy Markdown
Author

@JohnVillalovos appreciate the review, kindly check if it looks good now after review changes. any more suggestions also I would be happy to rectify sooner. thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for new merge train APIs

2 participants