GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation allows creating a new commit in a GitLab project's repository via the GitLab API. It is useful for automating repository changes such as adding, modifying, or deleting files programmatically. For example, it can be used in CI/CD pipelines to push configuration updates or in automation workflows to manage project files.

Use Case Examples

  1. Automate committing changes to a GitLab repository after generating files.
  2. Create commits to update documentation or configuration files in a project repository.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, typically an API key credential.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, default is GET but POST is used for creating commits.
Path Parameters Parameters included in the request path, specifically the project ID or URL-encoded path identifying the GitLab project repository where the commit will be created.

Output

JSON

  • id - The ID or URL-encoded path of the project where the commit was created.
  • commit - Details of the created commit returned by the GitLab API, including commit message, author, and changes.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the project ID or URL-encoded path is correct and accessible with the provided credentials.
  • Verify that the request body for the commit contains all required fields as per GitLab API specifications.
  • Check network connectivity and base URL correctness if the API request fails to reach the GitLab server.
  • Authentication errors may occur if the API key credential is missing, expired, or lacks sufficient permissions.

Links

Discussion