GitLab API

GitlabTool

Actions1000

Overview

This node operation updates or sets a distribution tag for a specific npm package within a GitLab group. It is useful for managing npm package versions and tags directly through GitLab's API, allowing users to automate package version tagging in their CI/CD pipelines or package management workflows.

Use Case Examples

  1. Automatically update the 'latest' tag of an npm package after a successful build.
  2. Manage multiple distribution tags for different release channels (e.g., 'beta', 'stable') in a GitLab group.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The 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 POST, PUT, DELETE, HEAD, or PATCH.
Path Parameters Parameters required in the API path to identify the group and the dist-tag to update.

Output

JSON

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

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the group ID and tag parameters are correctly set and URL-encoded if necessary.
  • Verify that the GitLab API key has sufficient permissions to update npm package tags.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure it is correct.
  • Common error: 401 Unauthorized - indicates authentication failure; verify API key and authentication settings.
  • Common error: 404 Not Found - indicates the group or package tag does not exist; verify path parameters.

Links

Discussion