diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-07-20 15:17:42 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-07-20 15:17:42 +0300 |
commit | e9862a9900c6269a41b65ca543035e57b49fede3 (patch) | |
tree | c2ed1f1a906ccb240f8a27d28e2b86ffdddbf3f1 /lib/ci | |
parent | c9c715cd5510456d83da5272f28b7ce7f248c77f (diff) |
Use struct instead of hash
Diffstat (limited to 'lib/ci')
-rw-r--r-- | lib/ci/api/triggers.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ci/api/triggers.rb b/lib/ci/api/triggers.rb index ce0ef95b186..6225203f223 100644 --- a/lib/ci/api/triggers.rb +++ b/lib/ci/api/triggers.rb @@ -25,10 +25,10 @@ module Ci # create request and trigger builds result = Ci::CreateTriggerRequestService.execute(project, trigger, params[:ref], variables) - pipeline = result[:pipeline] + pipeline = result.pipeline if pipeline.persisted? - present result[:trigger_request], with: Entities::TriggerRequest + present result.trigger_request, with: Entities::TriggerRequest else render_validation_error!(pipeline) end |