GitLab API

GitlabTool

Actions905

Overview

This node operation allows users to fork a GitLab project by specifying the project ID and the ID of the project it was forked from. It is useful for automating the process of creating a fork of an existing project in GitLab, which can be beneficial in scenarios such as setting up development environments, managing project versions, or contributing to open-source projects.

Use Case Examples

  1. Fork a project with ID '123' from a project with ID '456' to create a new forked repository automatically.
  2. Automate the creation of forks for multiple projects in a CI/CD pipeline.

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.
Path Parameters Parameters required in the URL path for the API call, including project ID and forked_from_id.

Output

JSON

  • id - ID of the forked project.
  • name - Name of the forked project.
  • path - Path of the forked project.
  • forked_from_project
    • id - ID of the original project it was forked from.
    • name - Name of the original project it was forked from.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and forked_from_id are correct and exist in GitLab to avoid 404 errors.
  • Authentication errors may occur if the API key is missing or invalid; verify credentials.
  • Check that the baseUrl is correctly set to the GitLab instance URL if using a self-hosted GitLab.
  • API rate limits may cause request failures; consider handling rate limit responses and retrying.

Links

Discussion