GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node interacts with the GitLab API to import projects from GitHub into GitLab. It is useful for automating the migration of repositories from GitHub to GitLab, especially in workflows where project import needs to be triggered programmatically. For example, a user can automate the import of multiple GitHub repositories into GitLab as part of a CI/CD pipeline or project setup process.

Use Case Examples

  1. Automate importing a GitHub repository into GitLab when a new project is created.
  2. Batch import multiple GitHub repositories into GitLab for migration purposes.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication when making the API request.
Authentication Specifies the authentication method to use, here it is GitLab API authentication.
baseUrl The base URL of the GitLab instance to which the API requests are sent.
Method The HTTP method used for the API request (GET, POST, PUT, DELETE, HEAD, PATCH).
Parameter Schema Defines the schema for the parameters sent in the request body for the postApiV4ImportGithub operation.
Request Body Schema Defines the schema for the request body for the postApiV4ImportGithub operation.
Request Path The API endpoint path for importing a GitHub project into GitLab (/api/v4/import/github).

Output

JSON

  • id - The unique identifier of the imported project.
  • name - The name of the imported project.
  • path - The path of the imported project.
  • import_status - The status of the import process (e.g., 'started', 'finished', 'failed').
  • import_error - Any error message related to the import process.
  • web_url - The URL to access the imported project on GitLab.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the GitLab API credentials are correctly configured and have sufficient permissions to import projects.
  • Verify the baseUrl is correct and accessible from the environment where the node runs.
  • Check the request body schema matches the expected format for the GitLab import API to avoid validation errors.
  • Common error messages include authentication failures, permission denied, or invalid request body. Resolving these typically involves verifying credentials, permissions, and request payload format.

Links

Discussion