diff options
author | Robert Speicher <robert@gitlab.com> | 2016-06-27 18:31:45 +0000 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-06-28 16:51:36 -0400 |
commit | 887d7202635b94f3854e9212e9efed1810dc5949 (patch) | |
tree | d4bc9458c2c9430a654f79064787cdeaf9a318bf | |
parent | b88112819a80b66311c099dddc7cf0b0a6cd235c (diff) | |
download | gitlab-ce-887d7202635b94f3854e9212e9efed1810dc5949.tar.gz |
Merge branch 'cherry-pick-5734e266' into 'master'
Fix rendering of commit notes
See merge request !4953
(cherry picked from commit 9c9b0eef46c7b3dfd7d7ce1133cbe2a1dc13e780)
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index 6751737d15e..d162a5a3165 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -18,9 +18,16 @@ class Projects::CommitController < Projects::ApplicationController apply_diff_view_cookie! @grouped_diff_notes = commit.notes.grouped_diff_notes + @notes = commit.notes.non_diff_notes.fresh + + Banzai::NoteRenderer.render( + @grouped_diff_notes.values.flatten + @notes, + @project, + current_user, + ) @note = @project.build_commit_note(commit) - @notes = commit.notes.non_diff_notes.fresh + @noteable = @commit @comments_target = { noteable_type: 'Commit', |