diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-05-10 17:41:46 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-05-13 17:31:43 -0500 |
commit | 99d3e21f19ffb5cccb58fdfeac4fb6174e7e65e2 (patch) | |
tree | 3dae33d98b9688a3f7e9a4c923f555920d86652b /app/controllers/projects/commit_controller.rb | |
parent | 5e130c3e39febcd577e61ebd30bd231827d41f2c (diff) | |
download | gitlab-ce-99d3e21f19ffb5cccb58fdfeac4fb6174e7e65e2.tar.gz |
Extract LegacyDiffNote out of Note
Diffstat (limited to 'app/controllers/projects/commit_controller.rb')
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index a202cb38692..9bcb82ef3f9 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -17,11 +17,12 @@ class Projects::CommitController < Projects::ApplicationController def show apply_diff_view_cookie! - @line_notes = commit.notes.inline + @grouped_diff_notes = commit.notes.grouped_diff_notes + @note = @project.build_commit_note(commit) - @notes = commit.notes.not_inline.fresh + @notes = commit.notes.non_diff_notes.fresh @noteable = @commit - @comments_allowed = @reply_allowed = true + @comments_allowed = true @comments_target = { noteable_type: 'Commit', commit_id: @commit.id @@ -67,10 +68,10 @@ class Projects::CommitController < Projects::ApplicationController create_commit(Commits::RevertService, success_notice: "The #{@commit.change_type_title} has been successfully reverted.", success_path: successful_change_path, failure_path: failed_change_path) end - + def cherry_pick assign_change_commit_vars(@commit.cherry_pick_branch_name) - + return render_404 if @target_branch.blank? create_commit(Commits::CherryPickService, success_notice: "The #{@commit.change_type_title} has been successfully cherry-picked.", |