diff options
author | Shinya Maeda <shinya@gitlab.com> | 2019-02-21 14:38:25 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2019-02-21 14:38:25 +0900 |
commit | d89c6979e5ed16dfa5dfb3bdacdf609548ccd8ae (patch) | |
tree | 1e1958ccd81118922e7ea044cd0b999079161b88 | |
parent | 5444b0a1fadf57cbbb2183001c53864421f8c0fc (diff) | |
download | gitlab-ce-fix-remote-url-for-merge-request-pipelines.tar.gz |
Fix remote url for merge request pipelinesfix-remote-url-for-merge-request-pipelines
-rw-r--r-- | app/models/ci/build.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 6b2b7e77180..f660c3f0ec1 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -480,7 +480,8 @@ module Ci return unless token auth = "gitlab-ci-token:#{token}@" - project.http_url_to_repo.sub(%r{^https?://}) do |prefix| + target_project = if merge_request? ? merge_request.target_project : project + target_project.http_url_to_repo.sub(%r{^https?://}) do |prefix| prefix + auth end end |