Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-09-20 16:18:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-20 16:18:24 +0300
commit0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch)
tree4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /app/controllers/projects/services_controller.rb
parent744144d28e3e7fddc117924fef88de5d9674fe4c (diff)
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'app/controllers/projects/services_controller.rb')
-rw-r--r--app/controllers/projects/services_controller.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb
index 0dcaab7160b..c42d382c4bb 100644
--- a/app/controllers/projects/services_controller.rb
+++ b/app/controllers/projects/services_controller.rb
@@ -26,15 +26,15 @@ class Projects::ServicesController < Projects::ApplicationController
attributes = integration_params[:integration]
if use_inherited_settings?(attributes)
- @integration.inherit_from_id = default_integration.id
+ integration.inherit_from_id = default_integration.id
- if saved = @integration.save(context: :manual_change)
- BulkUpdateIntegrationService.new(default_integration, [@integration]).execute
+ if saved = integration.save(context: :manual_change)
+ BulkUpdateIntegrationService.new(default_integration, [integration]).execute
end
else
attributes[:inherit_from_id] = nil
- @integration.attributes = attributes
- saved = @integration.save(context: :manual_change)
+ integration.attributes = attributes
+ saved = integration.save(context: :manual_change)
end
respond_to do |format|
@@ -65,15 +65,15 @@ class Projects::ServicesController < Projects::ApplicationController
private
def redirect_path
- safe_redirect_path(params[:redirect_to]).presence || edit_project_service_path(@project, @integration)
+ safe_redirect_path(params[:redirect_to]).presence || edit_project_service_path(project, integration)
end
def service_test_response
- unless @integration.update(integration_params[:integration])
- return { error: true, message: _('Validations failed.'), service_response: @integration.errors.full_messages.join(','), test_failed: false }
+ unless integration.update(integration_params[:integration])
+ return { error: true, message: _('Validations failed.'), service_response: integration.errors.full_messages.join(','), test_failed: false }
end
- result = ::Integrations::Test::ProjectService.new(@integration, current_user, params[:event]).execute
+ result = ::Integrations::Test::ProjectService.new(integration, current_user, params[:event]).execute
unless result[:success]
return { error: true, message: s_('Integrations|Connection failed. Please check your settings.'), service_response: result[:message].to_s, test_failed: true }
@@ -93,7 +93,7 @@ class Projects::ServicesController < Projects::ApplicationController
end
def integration
- @integration ||= @project.find_or_initialize_integration(params[:id])
+ @integration ||= project.find_or_initialize_integration(params[:id])
end
alias_method :service, :integration