summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2019-05-27 13:44:39 +0700
committerShinya Maeda <shinya@gitlab.com>2019-05-28 09:29:59 +0700
commit7e05f3b78b6e2e892bc309105711316dc17a109d (patch)
treef72d134b613ba1815f89b1cd7dec754cbe77a8c0 /lib
parent2b8d597f2f60243008f58ee63b2264fc72f12215 (diff)
downloadgitlab-ce-7e05f3b78b6e2e892bc309105711316dc17a109d.tar.gz
Use source ref for pipeline webhookuse-source-ref-name-in-webhook
When user uses Pipelines for merge requests, the pipeline is a run on a merge request ref instead of branch ref. However, we should send source ref as a webhook in order to respect the original behavior.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/data_builder/pipeline.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/data_builder/pipeline.rb b/lib/gitlab/data_builder/pipeline.rb
index fa06fb935f7..e1e813849bf 100644
--- a/lib/gitlab/data_builder/pipeline.rb
+++ b/lib/gitlab/data_builder/pipeline.rb
@@ -19,7 +19,7 @@ module Gitlab
def hook_attrs(pipeline)
{
id: pipeline.id,
- ref: pipeline.ref,
+ ref: pipeline.source_ref,
tag: pipeline.tag,
sha: pipeline.sha,
before_sha: pipeline.before_sha,