GitLab API icon

GitLab API

Gitlab

Actions1062

Commits → postApiV4ProjectsIdRepositoryCommitsShaRevert

AI-generated

Summary

Revert a specific commit in a GitLab project repository by providing the project ID or URL-encoded path and the commit SHA to revert.

Inputs

  • id (required) — The ID or URL-encoded path of the project containing the commit to revert.
  • sha (required) — The SHA hash of the commit to revert.
  • postApiV4ProjectsIdRepositoryCommitsShaRevert (required) — The request body containing parameters required to perform the revert operation (matching GitLab's API schema for revert commit).
  • baseUrl — The base URL of the GitLab instance, defaults to 'https://gitlab.com' if not specified.
  • skipAuthentication — Optionally skip authentication; defaults to false.

Output shape

a single commit object representing the result of the revert operation

The output reflects the reverted commit data returned by GitLab's API. Authentication is required unless 'skipAuthentication' is set to true. The operation sends a POST request to '/api/v4/projects/{id}/repository/commits/{sha}/revert'.

Links

Discussion