show who merged request
This commit is contained in:
parent
828f84fdb3
commit
7b75f3cfd3
3 changed files with 16 additions and 1 deletions
|
@ -68,6 +68,10 @@ class MergeRequest < ActiveRecord::Base
|
|||
commits.first
|
||||
end
|
||||
|
||||
def merge_event
|
||||
self.project.events.where(:target_id => self.id, :target_type => "MergeRequest", :action => Event::Merged).last
|
||||
end
|
||||
|
||||
# Return the number of +1 comments (upvotes)
|
||||
def upvotes
|
||||
notes.select(&:upvote?).size
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue