diff options
Diffstat (limited to 'app/services/git/process_ref_changes_service.rb')
-rw-r--r-- | app/services/git/process_ref_changes_service.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/services/git/process_ref_changes_service.rb b/app/services/git/process_ref_changes_service.rb index 6f348ff9e0b..da05f18b5ac 100644 --- a/app/services/git/process_ref_changes_service.rb +++ b/app/services/git/process_ref_changes_service.rb @@ -51,7 +51,7 @@ module Git change: change, push_options: params[:push_options], merge_request_branches: merge_request_branches, - create_pipelines: change[:index] < PIPELINE_PROCESS_LIMIT || Feature.enabled?(:git_push_create_all_pipelines, project), + create_pipelines: under_process_limit?(change), execute_project_hooks: execute_project_hooks, create_push_event: !create_bulk_push_event ).execute @@ -60,6 +60,10 @@ module Git create_bulk_push_event(ref_type, action, changes) if create_bulk_push_event end + def under_process_limit?(change) + change[:index] < PIPELINE_PROCESS_LIMIT || Feature.enabled?(:git_push_create_all_pipelines, project) + end + def create_bulk_push_event(ref_type, action, changes) EventCreateService.new.bulk_push( project, |