summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-08-12 00:47:26 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-08-12 00:47:26 +0200
commit1984697b35236cc57638aef2067365c25beb426f (patch)
tree2ef58ebdc37c33887cc0db82e57f3402547a1bb1 /app/models
parent4ccf39cde7356bf98bef5aae694257fb2c001e75 (diff)
parentded2b367ad0697765e01796f593493fc4942faeb (diff)
downloadgitlab-ce-1984697b35236cc57638aef2067365c25beb426f.tar.gz
Merge remote-tracking branch 'origin/master' into improve-pipeline-processing
Diffstat (limited to 'app/models')
-rw-r--r--app/models/merge_request.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index b1fb3ce5d69..f6d0d0c98f5 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -104,6 +104,7 @@ class MergeRequest < ActiveRecord::Base
scope :from_project, ->(project) { where(source_project_id: project.id) }
scope :merged, -> { with_state(:merged) }
scope :closed_and_merged, -> { with_states(:closed, :merged) }
+ scope :from_source_branches, ->(branches) { where(source_branch: branches) }
scope :join_project, -> { joins(:target_project) }
scope :references_project, -> { references(:target_project) }