diff options
author | Rubén Dávila <rdavila84@gmail.com> | 2016-02-05 18:12:41 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-02-19 13:14:50 -0500 |
commit | b36319a17cf82ee9782a572fab741938662a1c6b (patch) | |
tree | 3c56b390b6d4bb06a5dd7dc9d6c6a2f602679cc9 /app/controllers/projects/commit_controller.rb | |
parent | 806139936898726b32c4fe216ac3a9f4419ce91e (diff) | |
download | gitlab-ce-b36319a17cf82ee9782a572fab741938662a1c6b.tar.gz |
Make MRs with revert commit work.
Diffstat (limited to 'app/controllers/projects/commit_controller.rb')
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index d996b0f4ca7..21579b5629d 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -93,10 +93,13 @@ class Projects::CommitController < Projects::ApplicationController end def assign_revert_commit_vars + @commit = project.commit(params[:id]) @target_branch = params[:target_branch] - + @mr_source_branch = @commit.revert_branch_name + @mr_target_branch = @target_branch @commit_params = { - revert_commit_id: params[:id], + commit: @commit, + create_merge_request: params[:create_merge_request].present? || different_project? } end end |