module Gitlab::Client::Commits

def revert_commit(project, sha, branch, options = {})

Returns:
  • (Gitlab::ObjectifiedHash) -

Options Hash: (**options)
  • :dry_run (Boolean) -- Don't commit any changes

Parameters:
  • options (Hash) -- A customizable set of options.
  • branch (String) -- The name of the branch
  • sha (String) -- The commit hash or name of a repository branch or tag
  • project (Integer, String) -- The ID or name of a project.
def revert_commit(project, sha, branch, options = {})
  options[:branch] = branch
  post("/projects/#{url_encode project}/repository/commits/#{sha}/revert", body: options)
end