GitLab API

GitlabTool

Actions1000

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 the process of creating a fork of an existing project, which can be beneficial in scenarios such as collaborative development, code review, or creating a personal copy of a repository for experimentation.

Use Case Examples

  1. Fork a project by providing the original project ID and the forked-from project ID to automate repository management in CI/CD pipelines.
  2. Use this operation to programmatically create forks of projects for multiple users or environments.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, defaulting to 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 for the API path including project ID and forked-from project ID.

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 from which the fork was created.
    • name - The name of the original project from which the fork was created.
  • web_url - The web URL of the forked project.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the provided project ID and forked-from project ID are correct and accessible with the authenticated user.
  • Check that the authentication token has sufficient permissions to fork projects.
  • Verify the base URL is correct for the GitLab instance being used.
  • Common error messages include 404 Not Found if the project IDs are invalid, and 401 Unauthorized if authentication fails.

Links

Discussion