GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves the raw content of a specific blob (file) from a GitLab project's repository using the GitLab API. It is useful for scenarios where you need to access the exact file content at a particular commit hash, such as fetching source code files, configuration files, or any repository blob data directly.

Use Case Examples

  1. Fetching the raw content of a README file at a specific commit in a GitLab project.
  2. Accessing a configuration file's content from a repository to use in a CI/CD pipeline.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public repositories or testing.
Authentication Type of authentication used, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Path Parameters Parameters to specify the project ID or URL-encoded path and the commit hash (sha) to identify the blob to retrieve.

Output

JSON

  • rawContent - The raw content of the blob retrieved from the repository

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and commit hash (sha) are correct and exist in the repository to avoid 404 errors.
  • If authentication is required, verify that the GitLab API key credential is valid and has sufficient permissions.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure it is correct.

Links

Discussion