GitLab API

GitlabTool

Actions905

Overview

This node interacts with the GitLab API to fork a project by its ID or URL-encoded path. It is useful for automating project management tasks in GitLab, such as creating a fork of an existing project programmatically. For example, a user can trigger this node to fork a repository as part of a CI/CD pipeline or project setup workflow.

Use Case Examples

  1. Fork a GitLab project by specifying its project ID to create a personal copy for development.
  2. Automate the creation of forks for multiple projects in GitLab as part of a migration or backup process.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to GET but can be set to POST, PUT, DELETE, HEAD, or PATCH.
Path Parameters Parameters to be included in the request path, specifically the project ID or URL-encoded path required to identify the project to fork.

Output

JSON

  • id - The ID of the forked project.
  • name - The name of the forked project.
  • path - The path of the forked project.
  • web_url - The web URL of the forked project.
  • created_at - The creation timestamp of the forked project.

Dependencies

  • GitLab API authentication (API key or token)

Troubleshooting

  • Ensure the project ID or URL-encoded path is correct and accessible with the provided authentication.
  • Verify that the authentication credentials are valid and have sufficient permissions to fork projects.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common errors include 404 Not Found if the project does not exist or is inaccessible, and 401 Unauthorized if authentication fails.

Links

Discussion