Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow retrieving commits for merge request #491

Closed
rollie42 opened this issue Apr 24, 2018 · 1 comment
Closed

Allow retrieving commits for merge request #491

rollie42 opened this issue Apr 24, 2018 · 1 comment

Comments

@rollie42
Copy link

Description of the problem, including code/CLI snippet

API does not support getting commits for merge request (or documentation hasn't been updated)

see: https://docs.gitlab.com/ce/api/merge_requests.html#get-single-mr-commits

Expected Behavior

project.commits() should return a list of commits

Actual Behavior

Not defined in docs

Specifications

v4 (and v3?)

@gpocentek
Copy link
Contributor

Hi @rollie42

This is implemented, you can use the commits() method on ProjectMergeRequest objects: https://github.com/python-gitlab/python-gitlab/blob/master/gitlab/v4/objects.py#L1561-L1587

This is documented in the v4 API: http://python-gitlab.readthedocs.io/en/stable/api/gitlab.v4.html#gitlab.v4.objects.ProjectMergeRequest.commits but I'll add an example.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants