Class: Ci::ExternalPullRequests::CreatePipelineService
- Inherits:
-
BaseService
- Object
- BaseService
- Ci::ExternalPullRequests::CreatePipelineService
- Defined in:
- app/services/ci/external_pull_requests/create_pipeline_service.rb
Instance Attribute Summary
Attributes inherited from BaseService
#current_user, #params, #project
Instance Method Summary collapse
Methods inherited from BaseService
Methods included from BaseServiceUtility
#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level
Methods included from Gitlab::Allowable
Constructor Details
This class inherits a constructor from BaseService
Instance Method Details
#execute(pull_request) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'app/services/ci/external_pull_requests/create_pipeline_service.rb', line 9 def execute(pull_request) return pull_request_not_open_error unless pull_request.open? return pull_request_branch_error unless pull_request.actual_branch_head? Ci::ExternalPullRequests::CreatePipelineWorker.perform_async( project.id, current_user.id, pull_request.id ) end |