GitLab API icon

GitLab API

Gitlab

Actions880

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 commit configuration updates or in automation workflows to push code changes.

Use Case Examples

  1. Automate committing a new file to a GitLab repository after generating it dynamically.
  2. Create a commit that updates documentation files in a project repository as part of a scheduled workflow.

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.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but POST is used 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 used in the request path.
  • commit - Details of the commit created in the repository, including commit message, author, and changes.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID provided in path parameters is correct and accessible with the authenticated user.
  • Verify that the request body schema matches the expected structure for creating commits in GitLab API.
  • Check network connectivity and base URL correctness if the API request fails.
  • Authentication errors may occur if the API key is missing, invalid, or lacks necessary permissions.

Links

Discussion