GitLab API

GitlabTool

Actions1000

Overview

This node operation deletes a protected branch from a specified project in GitLab. It is useful for managing project branches by removing branch protection when it is no longer needed or to allow changes to the branch that were previously restricted. For example, a user can delete the protection on the 'main' branch of a project to allow direct commits or merges.

Use Case Examples

  1. Deleting the 'main' protected branch from a project identified by its ID or URL-encoded path.
  2. Removing branch protection to enable new workflows or branch management policies.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated API access.
Authentication Type of authentication used, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET but DELETE is used for this operation.
Path Parameters Parameters required in the URL path to identify the project and the protected branch to delete.

Output

JSON

  • statusCode - HTTP status code returned by the API indicating the result of the delete operation.
  • responseBody - The body of the response from the API, typically empty for a successful delete.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and branch name are correctly specified and URL-encoded if necessary.
  • Check that the API key has sufficient permissions to delete protected branches in the project.
  • If skipping authentication, verify that the GitLab instance allows unauthenticated access for this operation.

Links

Discussion