GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves a specific template from a GitLab project using the GitLab API. It is useful for accessing predefined templates such as Dockerfiles, gitignores, CI/CD configurations, licenses, issues, or merge requests associated with a project. For example, a user can fetch a license template like MIT or a gitignore template for a project to automate project setup or compliance.

Use Case Examples

  1. Fetch the MIT license template for a specific project to include in the project repository.
  2. Retrieve a gitignore template to configure ignored files for a new project.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Query Parameters Optional query parameters to refine the request.
Path Parameters Required path parameters to specify the project and template details.

Output

JSON

  • id - The ID or URL-encoded path of the project.
  • type - The type of the template requested.
  • name - The key of the template requested.
  • source_template_project_id - Optional project ID where the template is stored.
  • project - Optional project name for placeholder expansion in licenses.
  • fullname - Optional full name of copyright holder for placeholder expansion in licenses.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the project ID and template keys are correctly specified to avoid 404 errors.
  • Verify authentication credentials if the API returns unauthorized errors.
  • Check the base URL if using a self-hosted GitLab instance to avoid connection issues.

Links

Discussion