summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-06-27 18:31:45 +0000
committerRobert Speicher <robert@gitlab.com>2016-06-27 18:31:45 +0000
commit9c9b0eef46c7b3dfd7d7ce1133cbe2a1dc13e780 (patch)
tree3baa1c98be5fbfd743fda196b473e02d7ffacf85
parente0e325625eb141445720999d4e4a4d60a4b59d95 (diff)
parentc6f75fa4f41a9f96e517d8a9a3e1056db7947e47 (diff)
downloadgitlab-ce-9c9b0eef46c7b3dfd7d7ce1133cbe2a1dc13e780.tar.gz
Merge branch 'cherry-pick-5734e266' into 'master'
Fix rendering of commit notes See merge request !4953
-rw-r--r--CHANGELOG1
-rw-r--r--app/controllers/projects/commit_controller.rb9
2 files changed, 9 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 6defffefb77..56369d604cf 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -16,6 +16,7 @@ v 8.10.0 (unreleased)
v 8.9.2
- Update omniauth-saml to 1.6.0 !4951
+ - Fix rendering of commit notes !4953
v 8.9.1
- Refactor labels documentation. !3347
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',