diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-09-05 01:22:57 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-09-05 01:22:57 +0900 |
commit | 48f017d1e84498eec38d276d94918021a985bfee (patch) | |
tree | adbe1d89e597b4de487e1b9bcdb596887c0e9bbb /lib/api/v3 | |
parent | 209549c95fb0d4ba3196cc8ed888f7c024216ebb (diff) | |
download | gitlab-ce-48f017d1e84498eec38d276d94918021a985bfee.tar.gz |
Use pipeline.trigger_requests.lastfix/sm/35650-remove-createtriggerrequestservice-and-forbid-to-persist-variables-on-ci-triggerrequest
Diffstat (limited to 'lib/api/v3')
-rw-r--r-- | lib/api/v3/triggers.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/v3/triggers.rb b/lib/api/v3/triggers.rb index 13cfb9fe38b..534911fde5c 100644 --- a/lib/api/v3/triggers.rb +++ b/lib/api/v3/triggers.rb @@ -32,12 +32,12 @@ module API render_api_error!(result[:message], result[:http_status]) else pipeline = result[:pipeline] - trigger_request = Ci::TriggerRequest.find_by(commit_id: pipeline.id) # We switched to Ci::PipelineVariable from Ci::TriggerRequest.variables. # Ci::TriggerRequest doesn't save variables anymore. # Here is copying Ci::PipelineVariable to Ci::TriggerRequest.variables for presenting the variables. # The same endpoint in v4 API pressents Pipeline instead of TriggerRequest, so it doesn't need such a process. + trigger_request = pipeline.trigger_requests.last trigger_request.variables = params[:variables] present trigger_request, with: ::API::V3::Entities::TriggerRequest |