diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-13 12:08:49 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-13 12:08:49 +0000 |
commit | 1308dc5eb484ab0f8064989fc551ebdb4b1a7976 (patch) | |
tree | 614a93d9bf8df34ecfc25c02648329987fb21dde /lib | |
parent | f0707f413ce49b5712fca236b950acbec029be1e (diff) | |
download | gitlab-ce-1308dc5eb484ab0f8064989fc551ebdb4b1a7976.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/group_clusters.rb | 4 | ||||
-rw-r--r-- | lib/api/project_clusters.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/quick_actions/substitution_definition.rb | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/api/group_clusters.rb b/lib/api/group_clusters.rb index abfe10b7fa1..0108f6feae3 100644 --- a/lib/api/group_clusters.rb +++ b/lib/api/group_clusters.rb @@ -59,7 +59,7 @@ module API requires :token, type: String, desc: 'Token to authenticate against Kubernetes' optional :ca_cert, type: String, desc: 'TLS certificate (needed if API is using a self-signed TLS certificate)' optional :namespace, type: String, desc: 'Unique namespace related to Group' - optional :authorization_type, type: String, values: Clusters::Platforms::Kubernetes.authorization_types.keys, default: 'rbac', desc: 'Cluster authorization type, defaults to RBAC' + optional :authorization_type, type: String, values: ::Clusters::Platforms::Kubernetes.authorization_types.keys, default: 'rbac', desc: 'Cluster authorization type, defaults to RBAC' end use :create_params_ee end @@ -96,7 +96,7 @@ module API put ':id/clusters/:cluster_id' do authorize! :update_cluster, cluster - update_service = Clusters::UpdateService.new(current_user, update_cluster_params) + update_service = ::Clusters::UpdateService.new(current_user, update_cluster_params) if update_service.execute(cluster) present cluster, with: Entities::ClusterGroup diff --git a/lib/api/project_clusters.rb b/lib/api/project_clusters.rb index 8e35914f48a..b482980b88a 100644 --- a/lib/api/project_clusters.rb +++ b/lib/api/project_clusters.rb @@ -62,7 +62,7 @@ module API requires :token, type: String, desc: 'Token to authenticate against Kubernetes' optional :ca_cert, type: String, desc: 'TLS certificate (needed if API is using a self-signed TLS certificate)' optional :namespace, type: String, desc: 'Unique namespace related to Project' - optional :authorization_type, type: String, values: Clusters::Platforms::Kubernetes.authorization_types.keys, default: 'rbac', desc: 'Cluster authorization type, defaults to RBAC' + optional :authorization_type, type: String, values: ::Clusters::Platforms::Kubernetes.authorization_types.keys, default: 'rbac', desc: 'Cluster authorization type, defaults to RBAC' end use :create_params_ee end @@ -100,7 +100,7 @@ module API put ':id/clusters/:cluster_id' do authorize! :update_cluster, cluster - update_service = Clusters::UpdateService.new(current_user, update_cluster_params) + update_service = ::Clusters::UpdateService.new(current_user, update_cluster_params) if update_service.execute(cluster) present cluster, with: Entities::ClusterProject diff --git a/lib/gitlab/quick_actions/substitution_definition.rb b/lib/gitlab/quick_actions/substitution_definition.rb index 0fda056a4fe..b7231aa3a8b 100644 --- a/lib/gitlab/quick_actions/substitution_definition.rb +++ b/lib/gitlab/quick_actions/substitution_definition.rb @@ -10,14 +10,14 @@ module Gitlab end def match(content) - content.match %r{^/#{all_names.join('|')} ?(.*)$} + content.match %r{^/#{all_names.join('|')}(?![\S]) ?(.*)$} end def perform_substitution(context, content) return unless content all_names.each do |a_name| - content = content.gsub(%r{/#{a_name} ?(.*)$}i, execute_block(action_block, context, '\1')) + content = content.gsub(%r{/#{a_name}(?![\S]) ?(.*)$}i, execute_block(action_block, context, '\1')) end content |