GitLab API icon

GitLab API

Gitlab

Actions1062

Commits → postApiV4ProjectsIdRepositoryCommits

AI-generated

Summary

Create a new commit in a GitLab project's repository by specifying the project ID (or URL-encoded path) and providing the commit details in the request body.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project where the commit will be created.
  • postApiV4ProjectsIdRepositoryCommits (required) — The request body containing the commit details, such as branch, commit message, actions (file modifications), and author information.
  • skipAuthentication — Optionally skip using the configured GitLab API authentication (default is false).
  • baseUrl — Base URL of the GitLab instance, defaulting to https://gitlab.com.

Output shape

a JSON object representing the created commit as returned by GitLab's API

The operation returns the response from the POST /api/v4/projects/{id}/repository/commits endpoint, including details of the new commit. Authentication is required unless skipped. The 'id' path parameter and request body are mandatory.

Links

Discussion