Add revert to commits API
Closes https://gitlab.com/gitlab-org/release/framework/issues/48
Example:
$ curl --request POST --header "PRIVATE-TOKEN: [redacted]" --form "branch=master" "http://localhost:3000/api/v4/projects/gitlab-org%2Fgitlab-shell/repository/commits/f4ce4a3c31a9a7fb2fa0bb7daa185d34b8c03c00/revert"
{"id":"c27f0831d460367640408522dd5c5e901c6ec6f3","short_id":"c27f0831","title":"Revert \"Pass custom git_config_options to Gitalyo\"","created_at":"2018-11-08T15:55:26.000Z","parent_ids":["5a4a16fca63e7faf1ece8d40146a0df411a4b8a2"],"message":"Revert \"Pass custom git_config_options to Gitalyo\"\n\nThis reverts commit f4ce4a3c31a9a7fb2fa0bb7daa185d34b8c03c00","author_name":"Administrator","author_email":"admin@example.com","authored_date":"2018-11-08T15:55:26.000Z","committer_name":"Administrator","committer_email":"admin@example.com","committed_date":"2018-11-08T15:55:26.000Z"}
$ curl --request POST --header "PRIVATE-TOKEN: [redacted]" --form "branch=master" "http://localhost:3000/api/v4/projects/gitlab-org%2Fgitlab-shell/repository/commits/f4ce4a3c31a9a7fb2fa0bb7daa185d34b8c03c00/revert"
{"message":"Sorry, we cannot revert this commit automatically. This commit may already have been reverted, or a more recent commit may have updated some of its content."}
Edited by Robert Speicher