summaryrefslogtreecommitdiff
path: root/lib/api/services.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-07-06 15:54:41 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-07-06 15:54:41 +0800
commitef7deb18df2b97734e98c22aff53608e4e098bc5 (patch)
treeab86b4ce8671b13673f86d002c3b2386a7dcf0e9 /lib/api/services.rb
parent6fe2b79656cca21f9f1cea504e5cbb58a51a05ab (diff)
parent7f500acb5f38f0ae5d4e2d51e27b6257e0800c3d (diff)
downloadgitlab-ce-ef7deb18df2b97734e98c22aff53608e4e098bc5.tar.gz
Merge remote-tracking branch 'upstream/master' into 33360-generate-kubeconfig
* upstream/master: (888 commits) Fix Rubocop offense Use a previous approach for cycle analytics dummy pipeline Allow admin to disable all restricted visibility levels Removes file_name_regex from Gitlab::Regex Remove IIFEs around several javascript classes Update CHANGELOG.md for 9.3.5 Add ProjectPathHelper cop Create and use project path helpers that only need a project, no namespace Handles realtime with 2 states for environments table Revert "Merge branch '18000-remember-me-for-oauth-login' into 'master'" Allow creation of files and directories with spaces in web UI Disable Flipper memoizer in tests to avoid transient failures Introduce cache policies for CI jobs fix sidebar padding for full-width items (Time Tracking help) Replace 'snippets/snippets.feature' spinach with rspec Rename ci_config_file to ci_config_path Add back Pipeline#ci_yaml_file_path due to all the troubles Revert change to design. Go back to scrollable page Fix cycle analytics tests by making pipeline valid Fixes the column widths for the new navigation options in settings ...
Diffstat (limited to 'lib/api/services.rb')
-rw-r--r--lib/api/services.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/services.rb b/lib/api/services.rb
index 47bd9940f77..7488f95a9b7 100644
--- a/lib/api/services.rb
+++ b/lib/api/services.rb
@@ -685,7 +685,7 @@ module API
trigger_services.each do |service_slug, settings|
helpers do
- def chat_command_service(project, service_slug, params)
+ def slash_command_service(project, service_slug, params)
project.services.active.where(template: false).find do |service|
service.try(:token) == params[:token] && service.to_param == service_slug.underscore
end
@@ -710,7 +710,7 @@ module API
# This is not accurate, but done to prevent leakage of the project names
not_found!('Service') unless project
- service = chat_command_service(project, service_slug, params)
+ service = slash_command_service(project, service_slug, params)
result = service.try(:trigger, params)
if result