Don't use Hash#slice since it's not supported in Ruby 2.1
Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
parent
de12e6f0c4
commit
b4359fb24e
1 changed files with 8 additions and 3 deletions
|
@ -67,9 +67,14 @@ module API
|
||||||
pipeline = @project.ensure_pipeline(ref, commit.sha, current_user)
|
pipeline = @project.ensure_pipeline(ref, commit.sha, current_user)
|
||||||
|
|
||||||
status = GenericCommitStatus.running_or_pending.find_or_initialize_by(
|
status = GenericCommitStatus.running_or_pending.find_or_initialize_by(
|
||||||
project: @project, pipeline: pipeline,
|
project: @project,
|
||||||
user: current_user, name: name, ref: ref)
|
pipeline: pipeline,
|
||||||
status.attributes = declared(params).slice(:target_url, :description)
|
user: current_user,
|
||||||
|
name: name,
|
||||||
|
ref: ref,
|
||||||
|
target_url: params[:target_url],
|
||||||
|
description: params[:description]
|
||||||
|
)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
case params[:state].to_s
|
case params[:state].to_s
|
||||||
|
|
Loading…
Reference in a new issue