GitLab API

GitlabTool

Actions1000

Overview

This node operation deletes a fork of a project in GitLab using the GitLab API. It is useful for managing project forks by removing them when they are no longer needed, helping to keep the project repository clean and organized. For example, a user can delete a forked project by specifying its ID or URL-encoded path.

Use Case Examples

  1. Deleting a forked project by providing its project ID to clean up unused forks.
  2. Automating the removal of project forks in a CI/CD pipeline to maintain repository hygiene.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, default is GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but DELETE is relevant for this operation.
Path Parameters Parameters to be included in the request path, specifically the project ID or URL-encoded path to identify the fork to delete.

Output

JSON

  • id - The ID or URL-encoded path of the project fork that was deleted

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID or URL-encoded path is correct and exists; otherwise, the API will return an error indicating the project was not found.
  • If authentication is skipped or invalid, the API will return an authentication error; ensure valid GitLab API credentials are provided unless skipping authentication is intentional.
  • Verify the base URL is correct for the GitLab instance being accessed, especially if using a self-hosted GitLab server.

Links

Discussion