GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation deletes a specific branch from a GitLab project repository. It is useful for managing branches programmatically, such as cleaning up feature branches after merging or removing outdated branches to maintain repository hygiene.

Use Case Examples

  1. Automatically delete a feature branch after a merge request is completed.
  2. Remove stale branches from a project repository to keep it organized.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used for the request, defaulting to GitLab API authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the request, defaulting to GET but set to DELETE for this operation.
Path Parameters Parameters required in the request path to identify the project and branch to delete.

Output

JSON

  • success - Indicates whether the branch deletion was successful.
  • message - Additional information or error message related to the deletion operation.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the project ID and branch name are correctly specified and URL-encoded if necessary.
  • Verify that the authentication token has sufficient permissions to delete branches in the project.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include '404 Not Found' if the project or branch does not exist, and '403 Forbidden' if the token lacks permissions.

Links

Discussion