diff options
author | Felipe Artur <felipefac@gmail.com> | 2017-03-22 12:20:44 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2017-05-08 11:24:55 -0300 |
commit | 85f0b3a984048d1e5d146a233612a0bc96f12b5c (patch) | |
tree | 5161ccee6916d8a4c8cd776aa6f665ee0ca71e0e /app | |
parent | 4ae411ff40352ec21bd10f859b7f3f9f85a7aee6 (diff) | |
download | gitlab-ce-85f0b3a984048d1e5d146a233612a0bc96f12b5c.tar.gz |
Add merge requests association to pipeline
Diffstat (limited to 'app')
-rw-r--r-- | app/models/ci/pipeline.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index db994b861e5..481f9c8dac8 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -17,6 +17,7 @@ module Ci has_many :statuses, class_name: 'CommitStatus', foreign_key: :commit_id has_many :builds, foreign_key: :commit_id has_many :trigger_requests, dependent: :destroy, foreign_key: :commit_id + has_many :merge_requests, foreign_key: "head_pipeline_id" has_many :pending_builds, -> { pending }, foreign_key: :commit_id, class_name: 'Ci::Build' has_many :retryable_builds, -> { latest.failed_or_canceled }, foreign_key: :commit_id, class_name: 'Ci::Build' |