GitLab API

GitlabTool

Actions1095

Commits → postApiV4ProjectsIdRepositoryCommitsShaRevert

AI-generated

Summary

Revert a specific commit in a GitLab project by calling the revert commit API endpoint with the project ID and the commit SHA.

Inputs

  • Id (required) — The ID or URL-encoded path of the GitLab project containing the commit to revert.
  • Sha (required) — The commit SHA hash of the commit to revert.
  • Request Body (required) — The body must follow the schema for reverting a commit (postApiV4ProjectsIdRepositoryCommitsShaRevert), specifying details for the revert operation such as the target branch and commit message.
  • Skip Authentication — Whether to skip using authentication credentials (defaults to false).

Output shape

JSON object representing the newly created revert commit in the repository

The response returns the commit object that results from the revert operation. The output shape follows GitLab's commit representation schema for a created commit.

Links

Discussion