GitLab API

GitlabTool

Actions905

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. Check if blame information exists for a file in a GitLab project repository at a specific branch.
  2. Verify metadata about file blame without retrieving full file content.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method to use, typically GitLab API key authentication.
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 but HEAD is used for this operation.
Query Parameters Query parameters for the request, specifically the 'ref' parameter indicating the branch, tag, or commit name.
Path Parameters Path parameters for the request, including 'id' for the project ID and 'file_path' for the URL encoded path to the file.

Output

JSON

  • statusCode - HTTP status code of the HEAD request indicating success or failure.
  • headers - HTTP headers returned by the GitLab API for the blame file request.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and file path are correctly URL encoded and valid.
  • Verify the 'ref' parameter corresponds to an existing branch, tag, or commit in the repository.
  • Authentication errors may occur if the API key is missing or invalid; ensure proper credentials are configured.
  • HEAD requests do not return a response body; check HTTP status codes and headers for information.

Links

Discussion