提交 e26953bc 编写于 作者: K Katarzyna Kobierska

Build attributes with slice method

上级 52ebeb5a
...@@ -254,9 +254,6 @@ v 8.11.6 ...@@ -254,9 +254,6 @@ v 8.11.6
- Exclude some pending or inactivated rows in Member scopes. - Exclude some pending or inactivated rows in Member scopes.
- Add missing values to linter !6276 (Katarzyna Kobierska Ula Budziszewska) - Add missing values to linter !6276 (Katarzyna Kobierska Ula Budziszewska)
v 8.11.6 (unreleased)
- Fix an error where we were unable to create a CommitStatus for running state
v 8.11.5 v 8.11.5
- Optimize branch lookups and force a repository reload for Repository#find_branch. !6087 - Optimize branch lookups and force a repository reload for Repository#find_branch. !6087
- Fix member expiration date picker after update. !6184 - Fix member expiration date picker after update. !6184
......
...@@ -13,24 +13,19 @@ module Ci ...@@ -13,24 +13,19 @@ module Ci
private private
def create_build(build_attributes) def create_build(build_attributes)
build_attributes = { build_attributes = build_attributes.slice(
stage_idx: build_attributes[:stage_idx], :stage_idx, :stage, :commands, :tag_list, :name, :when, :allow_failure,
stage: build_attributes[:stage], :environment, :yaml_variables, :options
commands: build_attributes[:commands], )
tag_list: build_attributes[:tag_list],
name: build_attributes[:name], build_attributes = build_attributes.merge(
when: build_attributes[:when],
allow_failure: build_attributes[:allow_failure],
environment: build_attributes[:environment],
yaml_variables: build_attributes[:yaml_variables],
options: build_attributes[:options],
pipeline: pipeline, pipeline: pipeline,
project: pipeline.project, project: pipeline.project,
ref: pipeline.ref, ref: pipeline.ref,
tag: pipeline.tag, tag: pipeline.tag,
user: current_user, user: current_user,
trigger_request: trigger_request trigger_request: trigger_request
} )
pipeline.builds.create(build_attributes) pipeline.builds.create(build_attributes)
end end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册