GitLab API

GitlabTool

Actions905

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 updates or in automation workflows to manage project files without manual intervention.

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 for GitLab.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the request, default is POST 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, including commit message, author, and changes.

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the project ID is correctly URL-encoded and valid to avoid 404 errors.
  • Verify that the authentication token has sufficient permissions to create commits in the target repository.
  • Check that the request body schema matches the expected structure for creating commits to prevent validation errors.

Links

Discussion