GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation allows users to fork a project in GitLab by specifying the project ID and the ID of the project it was forked from. It is useful for automating project forking workflows in GitLab, such as creating a copy of a repository for development or collaboration purposes.

Use Case Examples

  1. Fork a GitLab project by providing the project ID and the forked-from project ID to automate repository duplication.
  2. Use this operation in CI/CD pipelines to programmatically fork projects before running tests or deployments.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public endpoints or testing.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET but POST is used for this operation.
Path Parameters Parameters required in the URL path to identify the project and the forked-from project.

Output

JSON

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

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and forked_from_id are correctly provided and exist in GitLab to avoid 404 errors.
  • Authentication errors may occur if the API key is missing or invalid; verify the API key credentials.
  • Check that the baseUrl is correct for your GitLab instance, especially if using a self-hosted GitLab server.
  • HTTP method must be POST for this operation; using GET or others may result in errors.

Links

Discussion