GitLab API icon

GitLab API

Gitlab

Actions1062

Projects → getApiV4ProjectsIdRepositoryMergeBase

AI-generated

Summary

Retrieve the common ancestor (merge base) commit of specified refs within a project's repository on GitLab.

Inputs

  • id (required) — The ID or URL-encoded path of the project to query.
  • refs (required) — Array of branch or tag names (refs) to find the common ancestor for; multiple refs can be specified.

Output shape

a single JSON object representing the merge base commit information from the GitLab API response

The operation uses an HTTP GET method to the endpoint /api/v4/projects/{id}/repository/merge_base with query parameter 'refs'. Authentication via 'gitlabApi' credential is required unless 'Skip Authentication' is enabled.

Links

Discussion