summaryrefslogtreecommitdiff
path: root/app/models/ci/bridge.rb
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2019-04-25 15:23:39 +0700
committerShinya Maeda <shinya@gitlab.com>2019-04-29 18:52:51 +0700
commited3a2fc8d7fef157706859dd009e1662fdc3d4b5 (patch)
tree6468ddc17f339ce41b7c00648020b75a615f9bef /app/models/ci/bridge.rb
parentddee4426c4bd3df8bde7936a6ffb0a1973a4d5a1 (diff)
downloadgitlab-ce-ed3a2fc8d7fef157706859dd009e1662fdc3d4b5.tar.gz
Fix CI_COMMIT_REF_NAME and SLUG variable
With Pipelines for Merge Requests feature, users cannout keep using $CI_COMMIT_REF_NAME and _SLUG predefined variables for dynamic environments. We fix this problem by explicitly looking at the source ref.
Diffstat (limited to 'app/models/ci/bridge.rb')
-rw-r--r--app/models/ci/bridge.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/models/ci/bridge.rb b/app/models/ci/bridge.rb
index 0d8d7d95791..644716ba8e7 100644
--- a/app/models/ci/bridge.rb
+++ b/app/models/ci/bridge.rb
@@ -4,6 +4,7 @@ module Ci
class Bridge < CommitStatus
include Ci::Processable
include Ci::Contextable
+ include Ci::PipelineDelegator
include Importable
include AfterCommitQueue
include HasRef
@@ -13,8 +14,6 @@ module Ci
belongs_to :trigger_request
validates :ref, presence: true
- delegate :merge_request_event?, to: :pipeline
-
def self.retry(bridge, current_user)
raise NotImplementedError
end