GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation retrieves the commit sequence information for a specific commit SHA in a GitLab project repository using the GitLab API v4. It is useful for developers or DevOps engineers who need to analyze commit sequences or track changes in a project's repository. For example, it can be used to fetch the sequence of commits related to a particular commit SHA to understand the commit history or merge details.

Use Case Examples

  1. Fetch commit sequence for a given commit SHA in a project to analyze the commit history.
  2. Retrieve the first parent of merges for a specific commit to understand merge lineage.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
Authentication Type of authentication used for the API request, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method used for the API request, default is GET.
Query Parameters Additional query parameters for the API request, such as 'first_parent' to include only the first parent of merges.
Path Parameters Path parameters required for the API request, including 'id' for the project ID or URL-encoded path, and 'sha' for the commit SHA.

Output

JSON

  • id - The ID or URL-encoded path of the project.
  • sha - The commit SHA used to fetch the commit sequence.
  • sequence - The commit sequence data returned from the GitLab API for the specified commit SHA.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and commit SHA are correctly provided and URL-encoded if necessary.
  • Verify that the GitLab API key credential is valid and has sufficient permissions to access the repository commits.
  • 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