diff options
author | Matija Čupić <matteeyah@gmail.com> | 2017-11-17 17:24:40 +0100 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2017-11-28 12:42:08 -0600 |
commit | a4a389a0a7314d011275592474bd974924f86735 (patch) | |
tree | 3469be680f8e0cf5931cb54fa784a86389e43d0f /app/services/projects | |
parent | a7f6ab952acc58e7ef9a33fba3fbaaa0918572fe (diff) | |
download | gitlab-ce-a4a389a0a7314d011275592474bd974924f86735.tar.gz |
BE for automatic pipeline when enabling Auto DevOps
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/38962
Diffstat (limited to 'app/services/projects')
-rw-r--r-- | app/services/projects/update_service.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/services/projects/update_service.rb b/app/services/projects/update_service.rb index 13e292a18bf..72eecc61c96 100644 --- a/app/services/projects/update_service.rb +++ b/app/services/projects/update_service.rb @@ -15,7 +15,7 @@ module Projects return error("Could not set the default branch") unless project.change_head(params[:default_branch]) end - if project.update_attributes(params.except(:default_branch)) + if project.update_attributes(update_params) if project.previous_changes.include?('path') project.rename_repo else @@ -31,8 +31,16 @@ module Projects end end + def run_auto_devops_pipeline? + params.dig(:run_auto_devops_pipeline_explicit) == 'true' || params.dig(:run_auto_devops_pipeline_implicit) == 'true' + end + private + def update_params + params.except(:default_branch, :run_auto_devops_pipeline_explicit, :run_auto_devops_pipeline_implicit) + end + def renaming_project_with_container_registry_tags? new_path = params[:path] |