GitLab API

GitlabTool

Actions1000

Overview

This node operation deletes all merged branches in a specified GitLab project repository. It is useful for cleaning up merged branches to maintain a tidy repository. For example, after completing multiple feature branches merged into the main branch, this operation can be used to remove those merged branches automatically.

Use Case Examples

  1. Automatically delete all merged branches in a GitLab project to keep the repository clean.
  2. Clean up merged branches after a release cycle in a GitLab project.

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 to use for the request, default is GET but DELETE is used for this operation.
Path Parameters The path parameters for the API request, specifically the project ID or URL-encoded path.

Output

JSON

  • statusCode - HTTP status code of the API response indicating success or failure.
  • body - The response body from the API call, typically empty for delete operations.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible with the authenticated user.
  • Verify that the authentication credentials are valid and have sufficient permissions to delete merged branches.
  • 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 ID is invalid, 401 Unauthorized if authentication fails, and 403 Forbidden if permissions are insufficient.

Links

Discussion