diff --git a/CHANGELOG b/CHANGELOG index da2ee1fec7e5ae4a95194709b558a3a0c5557a5e..2e12dd31d323dc993edfee3d9eb8c6f0ea992f92 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -254,9 +254,6 @@ v 8.11.6 - Exclude some pending or inactivated rows in Member scopes. - 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 - Optimize branch lookups and force a repository reload for Repository#find_branch. !6087 - Fix member expiration date picker after update. !6184 diff --git a/app/services/ci/create_pipeline_builds_service.rb b/app/services/ci/create_pipeline_builds_service.rb index 3c12b806438501403e7aaa1c0155fb733f7a1543..3fc707b1e148d5117863e197eab1b66939ec11d3 100644 --- a/app/services/ci/create_pipeline_builds_service.rb +++ b/app/services/ci/create_pipeline_builds_service.rb @@ -13,24 +13,19 @@ module Ci private def create_build(build_attributes) - build_attributes = { - stage_idx: build_attributes[:stage_idx], - stage: build_attributes[:stage], - commands: build_attributes[:commands], - tag_list: build_attributes[:tag_list], - name: build_attributes[:name], - when: build_attributes[:when], - allow_failure: build_attributes[:allow_failure], - environment: build_attributes[:environment], - yaml_variables: build_attributes[:yaml_variables], - options: build_attributes[:options], + build_attributes = build_attributes.slice( + :stage_idx, :stage, :commands, :tag_list, :name, :when, :allow_failure, + :environment, :yaml_variables, :options + ) + + build_attributes = build_attributes.merge( pipeline: pipeline, project: pipeline.project, ref: pipeline.ref, tag: pipeline.tag, user: current_user, trigger_request: trigger_request - } + ) pipeline.builds.create(build_attributes) end