GitLab API

GitlabTool

Actions1000

Overview

This node operation performs a HEAD request to the GitLab API endpoint that retrieves blame information for a specific file in a project's repository. It is useful for scenarios where you want to check metadata or existence of blame data for a file without downloading the full content. For example, it can be used to verify if blame information is available for a file at a certain commit, branch, or tag in a GitLab project repository.

Use Case Examples

  1. Checking if blame data exists for a file before fetching detailed blame information.
  2. Verifying file blame metadata in automated CI/CD pipelines to trigger further actions.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication to use, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, defaulting to GET but can be set to HEAD for this operation.
Query Parameters Query parameters for the request, specifically the 'ref' parameter indicating the branch, tag, or commit name to target.
Path Parameters Path parameters for the request, including 'id' for the project ID and 'file_path' for the URL-encoded path to the file in the repository.

Output

JSON

  • statusCode - HTTP status code of the HEAD request indicating success or failure.
  • headers - HTTP headers returned by the HEAD request providing metadata about the file blame information.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and file path are correctly URL-encoded and valid in the GitLab repository.
  • Verify that the 'ref' query parameter is correctly set to an existing branch, tag, or commit SHA.
  • If authentication is enabled, confirm that the GitLab API key credential is valid and has sufficient permissions to access the project repository.
  • Common error messages include 404 Not Found if the file or project does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion