GitLab API

GitlabTool

Actions1095

Commits → getApiV4ProjectsIdRepositoryCommitsShaSequence

AI-generated

Summary

Retrieve the sequence of commits starting from a specified commit SHA within a project repository on GitLab.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project from which to get commits.
  • sha (required) — The commit SHA from which to start the commit sequence retrieval.
  • first_parent — Boolean flag to include only the first parent of merge commits when set to true.
  • baseUrl — The GitLab instance base URL, defaulting to https://gitlab.com.
  • method — HTTP method to use, default is GET. For this operation, GET is standard.
  • skipAuthentication — Optional toggle to skip authentication for the request.

Output shape

a JSON object representing the commit sequence retrieved from the GitLab API as per the specified project ID and commit SHA.

Returns the data directly from the GET request to /api/v4/projects/{id}/repository/commits/{sha}/sequence. The output shape corresponds to GitLab's API response for this endpoint and includes commit details. Pagination is not indicated.

Examples

Example 1: Retrieve commit sequence for a merge commit with first parents only

Set 'id' to the project ID/path, 'sha' to the merge commit SHA, and 'first_parent' to true to filter merge commit parents.

Links

Discussion