GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves the commit sequence for a specific commit SHA in a GitLab project repository. It is useful for developers or DevOps engineers who want to analyze the commit history or sequence related to a particular commit in a GitLab project. For example, it can be used to trace the commit lineage or understand the sequence of changes leading to a specific commit.

Use Case Examples

  1. Get the commit sequence for a commit SHA in a project to analyze the commit history.
  2. Use the commit sequence data to visualize the commit graph or lineage in a CI/CD pipeline.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, default is GET.
Parameter Schema Defines the required path and query parameters for the operation, including project ID, commit SHA, and optional first_parent flag.
Request Body Schema Schema for the request body, null for this GET operation.
Request Path The API endpoint path for the operation, with placeholders for project ID and commit SHA.
Query Parameters Optional query parameters for the request, such as first_parent to include only the first parent of merges.
Path Parameters Path parameters including the project ID or URL-encoded path and the commit SHA to identify the commit.

Output

JSON

  • commitSequence - The sequence of commits related to the specified commit SHA in the project repository.

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the project ID and commit SHA are correctly specified and URL-encoded if necessary.
  • Verify that the API authentication token is valid and has sufficient permissions to access the project repository.
  • Check the base URL if using a self-hosted GitLab instance instead of gitlab.com.
  • Common error messages include 404 Not Found if the project or commit SHA does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion