GitLab API

GitlabTool

Actions905

Overview

This node interacts with the GitLab API to update the distribution tag of an npm package. It is useful for managing npm package versions and tags directly within GitLab, allowing users to programmatically set or update dist-tags for npm packages hosted on GitLab's package registry. For example, it can be used to promote a specific package version to a 'latest' tag or any other custom tag.

Use Case Examples

  1. Updating the 'latest' dist-tag of an npm package to point to a new version.
  2. Setting a custom dist-tag for an npm package to manage different release channels.

Properties

Name Meaning
Skip Authentication Option to skip authentication for 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, defaulting to https://gitlab.com.
Method HTTP method used for the request, default is PUT for this operation.
Tag The distribution tag of the npm package to update, provided as a path parameter.

Output

JSON

  • response - The JSON response from the GitLab API after updating the npm package dist-tag.

Dependencies

  • Requires GitLab API key credential for authentication unless skipping authentication.

Troubleshooting

  • Ensure the GitLab API key has sufficient permissions to update npm package dist-tags.
  • Verify the 'tag' path parameter is correctly set and matches an existing dist-tag.
  • Check the baseUrl is correct for your GitLab instance if using a self-hosted GitLab server.
  • Common errors include authentication failures (401 Unauthorized) and invalid path parameters (404 Not Found or 400 Bad Request).

Links

Discussion