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-07-20 12:55:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 12:55:51 +0300
commite8d2c2579383897a1dd7f9debd359abe8ae8373d (patch)
treec42be41678c2586d49a75cabce89322082698334 /app/controllers/projects/mattermosts_controller.rb
parentfc845b37ec3a90aaa719975f607740c22ba6a113 (diff)
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'app/controllers/projects/mattermosts_controller.rb')
-rw-r--r--app/controllers/projects/mattermosts_controller.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/controllers/projects/mattermosts_controller.rb b/app/controllers/projects/mattermosts_controller.rb
index ac204427885..ebba20b285a 100644
--- a/app/controllers/projects/mattermosts_controller.rb
+++ b/app/controllers/projects/mattermosts_controller.rb
@@ -7,7 +7,7 @@ class Projects::MattermostsController < Projects::ApplicationController
layout 'project_settings'
before_action :authorize_admin_project!
- before_action :service
+ before_action :integration
before_action :teams, only: [:new]
feature_category :integrations
@@ -16,11 +16,11 @@ class Projects::MattermostsController < Projects::ApplicationController
end
def create
- result, message = @service.configure(current_user, configure_params)
+ result, message = integration.configure(current_user, configure_params)
if result
flash[:notice] = 'This service is now configured'
- redirect_to edit_project_service_path(@project, service)
+ redirect_to edit_project_service_path(@project, integration)
else
flash[:alert] = message || 'Failed to configure service'
redirect_to new_project_mattermost_path(@project)
@@ -31,15 +31,15 @@ class Projects::MattermostsController < Projects::ApplicationController
def configure_params
params.require(:mattermost).permit(:trigger, :team_id).merge(
- url: service_trigger_url(@service),
+ url: service_trigger_url(integration),
icon_url: asset_url('slash-command-logo.png', skip_pipeline: true))
end
def teams
- @teams, @teams_error_message = @service.list_teams(current_user)
+ @teams, @teams_error_message = integration.list_teams(current_user)
end
- def service
- @service ||= @project.find_or_initialize_service('mattermost_slash_commands')
+ def integration
+ @integration ||= @project.find_or_initialize_integration('mattermost_slash_commands')
end
end