GitLab API

GitlabTool

Actions1095

Merge_requests → getApiV4ProjectsIdMergeRequestsMergeRequestIidContextCommits

AI-generated

Summary

Retrieve the list of commits in the context of a specified merge request in a GitLab project.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project.
  • merge_request_iid (required) — The internal ID of the merge request to retrieve context commits for.
  • skipAuthentication — Optionally skip authentication for this request (default is false).
  • baseUrl — The base URL of the GitLab instance (default is https://gitlab.com).

Output shape

a list of commit objects representing the merge request's context commits

The response is obtained by a GET request to the endpoint /api/v4/projects/{id}/merge_requests/{merge_request_iid}/context_commits. Authentication is required unless explicitly skipped. The output fields correspond to the GitLab API's merge request context commits response.

Links

Discussion