diff options
author | micael.bergeron <micael.bergeron@solutionstlm.com> | 2017-08-15 09:21:27 -0400 |
---|---|---|
committer | micael.bergeron <micael.bergeron@solutionstlm.com> | 2017-09-06 09:00:57 -0400 |
commit | b44a1bcd0b94a68f680c24d0dfd6d3402af9a881 (patch) | |
tree | b20c07b3bfaf86f00255a27f7428e1000c930fca /app/models/note.rb | |
parent | 45b83ed99afc5cfe24a8d84869894124d93d5b51 (diff) | |
download | gitlab-ce-b44a1bcd0b94a68f680c24d0dfd6d3402af9a881.tar.gz |
rework the contributor badge
- only show in merge-requests
- show as a little glyph
Diffstat (limited to 'app/models/note.rb')
-rw-r--r-- | app/models/note.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index 28cd54bd81c..b1fe60aa387 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -236,6 +236,11 @@ class Note < ActiveRecord::Base def specialize!(role) self.special_role = role if !block_given? || yield(self) end + + def specialize_for_first_contribution!(noteable) + return unless noteable.author_id == self.author_id + specialize!(Note::SpecialRole::FIRST_TIME_CONTRIBUTOR) + end def editable? !system? |