summaryrefslogtreecommitdiff
path: root/app/helpers/notes_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/notes_helper.rb')
-rw-r--r--app/helpers/notes_helper.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb
index 083ace65b09..1e7d346ab8f 100644
--- a/app/helpers/notes_helper.rb
+++ b/app/helpers/notes_helper.rb
@@ -76,6 +76,11 @@ module NotesHelper
note.project.team.human_max_access(note.author_id)
end
+ def note_first_contribution_for_user?(note)
+ note.noteable.author_id == note.author_id &&
+ note.project.merge_requests.merged.where(author_id: note.author_id).empty?
+ end
+
def discussion_path(discussion)
if discussion.for_merge_request?
return unless discussion.diff_discussion?