GitLab API

GitlabTool

Actions1000

Overview

This node operation allows users to create a Composer package for a specific project in GitLab by making a POST request to the GitLab API endpoint `/api/v4/projects/{id}/packages/composer`. It is useful for automating package management and deployment workflows within GitLab projects, especially when integrating Composer packages.

Use Case Examples

  1. Automate the publishing of Composer packages to a GitLab project repository.
  2. Integrate Composer package creation into CI/CD pipelines for PHP projects hosted on GitLab.

Properties

Name Meaning
Skip Authentication Option to skip API authentication for the request.
Authentication Type of authentication used for the API request, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is POST for this operation.
Path Parameters Parameters to be included in the request path, specifically the project ID or URL-encoded path.

Output

JSON

  • id - The ID or URL-encoded path of the project for which the Composer package is created
  • packageDetails - Details of the created Composer package returned by the GitLab API

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible with the provided API credentials.
  • Verify that the GitLab API key has sufficient permissions to create packages in the specified project.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include authentication failures, permission denied errors, and invalid project ID errors. Resolving these typically involves verifying credentials, permissions, and input parameters.

Links

Discussion