GitLab API

GitlabTool

Actions905

Overview

This node operation deletes a specific dist-tag from an npm package within a GitLab project. It is useful for managing package versions by removing outdated or incorrect distribution tags from npm packages hosted in GitLab projects. For example, if a particular version tag of a package is no longer valid or needed, this operation can remove that tag to keep the package metadata clean and accurate.

Use Case Examples

  1. Deleting a 'latest' dist-tag from an npm package in a GitLab project to prevent users from installing that version by default.
  2. Removing a deprecated version tag from a package to avoid confusion among developers using the package.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, typically an API key credential.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the request, which is DELETE for this operation.
Query Parameters Query parameters for the request, specifically the package name to identify the npm package.
Path Parameters Path parameters for the request, including the project ID or URL-encoded path and the dist-tag to delete.

Output

JSON

  • statusCode - HTTP status code of the delete operation response.
  • responseBody - Response body returned from the API after deleting the dist-tag.

Dependencies

  • An API key credential for GitLab authentication

Troubleshooting

  • Ensure the project ID and package name are correctly URL-encoded to avoid 404 errors.
  • Verify that the authentication token has sufficient permissions to delete package tags in the project.
  • Check that the dist-tag specified exists; attempting to delete a non-existent tag may result in an error.

Links

Discussion