GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves the distribution tags of a specified npm package from the GitLab API (v4). It is useful for developers or automation workflows that need to fetch metadata about npm packages hosted on GitLab, such as version tags associated with a package. For example, it can be used to check the latest version tags of a package before deployment or integration.

Use Case Examples

  1. Fetch distribution tags for a specific npm package to determine available versions.
  2. Automate version checks in CI/CD pipelines by retrieving npm package tags from GitLab.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication when making the API request.
Authentication Specifies the authentication method to use, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance to which the request is sent, defaulting to https://gitlab.com.
Method The HTTP method used for the request, default is GET.
Query Parameters Collection of query parameters for the request, specifically the package_name which is required to identify the npm package.

Output

JSON

  • dist-tags - The distribution tags of the npm package, typically including version tags like 'latest'.

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the package_name query parameter is provided and correctly spelled; missing or incorrect package names will cause errors.
  • If authentication is enabled, verify that the GitLab API token is valid and has sufficient permissions to access package information.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure the URL is correct and accessible.
  • Common error messages may include 401 Unauthorized (authentication issues), 404 Not Found (package does not exist), or 400 Bad Request (invalid parameters). Resolving these involves verifying credentials, package names, and request parameters.

Links

Discussion