From 08bbb9fce66cb46d3262e6cd4c4379b59f065be0 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Thu, 9 Mar 2017 19:29:11 -0600 Subject: Add option to start a new discussion on an MR --- app/models/commit.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/models/commit.rb') diff --git a/app/models/commit.rb b/app/models/commit.rb index ce92cc369ad..5c452f78546 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -2,6 +2,7 @@ class Commit extend ActiveModel::Naming include ActiveModel::Conversion + include Noteable include Participable include Mentionable include Referable @@ -203,6 +204,10 @@ class Commit project.notes.for_commit_id(self.id) end + def discussion_notes + notes.non_diff_notes + end + def notes_with_associations notes.includes(:author) end -- cgit v1.2.1