GitLab API

GitlabTool

Actions1000

Overview

This node operation allows creating a protected tag in a specific GitLab project by making a POST request to the GitLab API endpoint `/api/v4/projects/{id}/protected_tags`. It is useful for automating the management of protected tags in GitLab projects, such as restricting who can create or update certain tags to maintain code integrity and release control.

Use Case Examples

  1. Automatically protect release tags in a CI/CD pipeline to prevent unauthorized changes.
  2. Create protected tags programmatically when setting up new projects or repositories.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated API access.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET but POST is used for this operation.
Path Parameters Parameters to specify the project ID or URL-encoded path where the protected tag will be created.

Output

JSON

  • id - The ID of the created protected tag.
  • name - The name of the protected tag.
  • create_access_levels - Access levels that are allowed to create the protected tag.
  • update_access_levels - Access levels that are allowed to update the protected tag.

Dependencies

  • GitLab API authentication credentials

Troubleshooting

  • Ensure the project ID provided in path parameters is correct and accessible with the provided credentials.
  • Verify that the authentication credentials are valid and have sufficient permissions to create protected tags in the project.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include 401 Unauthorized (invalid credentials), 404 Not Found (project not found), and 403 Forbidden (insufficient permissions).

Links

Discussion