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-11-02 21:12:13 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-02 21:12:13 +0300
commit23f57fb31fe83ea8666753f94118f6d834517dfb (patch)
tree0055fc79e5fe1bbb43afcbbce71c745df01f3f6c /app/controllers
parent125c8a6a81c1c09911c09183c66768571cfd95b4 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin/hook_logs_controller.rb2
-rw-r--r--app/controllers/admin/hooks_controller.rb2
-rw-r--r--app/controllers/admin/integrations_controller.rb2
-rw-r--r--app/controllers/concerns/integrations/actions.rb (renamed from app/controllers/concerns/integrations_actions.rb)2
-rw-r--r--app/controllers/concerns/integrations/hooks_execution.rb (renamed from app/controllers/concerns/hooks_execution.rb)2
-rw-r--r--app/controllers/explore/projects_controller.rb13
-rw-r--r--app/controllers/groups/settings/integrations_controller.rb2
-rw-r--r--app/controllers/projects/hook_logs_controller.rb2
-rw-r--r--app/controllers/projects/hooks_controller.rb2
9 files changed, 21 insertions, 8 deletions
diff --git a/app/controllers/admin/hook_logs_controller.rb b/app/controllers/admin/hook_logs_controller.rb
index 4cebfb485e5..aa13673095d 100644
--- a/app/controllers/admin/hook_logs_controller.rb
+++ b/app/controllers/admin/hook_logs_controller.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
class Admin::HookLogsController < Admin::ApplicationController
- include HooksExecution
+ include ::Integrations::HooksExecution
before_action :hook, only: [:show, :retry]
before_action :hook_log, only: [:show, :retry]
diff --git a/app/controllers/admin/hooks_controller.rb b/app/controllers/admin/hooks_controller.rb
index fb397e7c8c7..6f5475a4a78 100644
--- a/app/controllers/admin/hooks_controller.rb
+++ b/app/controllers/admin/hooks_controller.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
class Admin::HooksController < Admin::ApplicationController
- include HooksExecution
+ include ::Integrations::HooksExecution
before_action :hook_logs, only: :edit
diff --git a/app/controllers/admin/integrations_controller.rb b/app/controllers/admin/integrations_controller.rb
index a3eb24b9b6f..ad0ee0b2cef 100644
--- a/app/controllers/admin/integrations_controller.rb
+++ b/app/controllers/admin/integrations_controller.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
class Admin::IntegrationsController < Admin::ApplicationController
- include IntegrationsActions
+ include ::Integrations::Actions
before_action :not_found, unless: -> { instance_level_integrations? }
diff --git a/app/controllers/concerns/integrations_actions.rb b/app/controllers/concerns/integrations/actions.rb
index 47d09d7e375..6490742c0f8 100644
--- a/app/controllers/concerns/integrations_actions.rb
+++ b/app/controllers/concerns/integrations/actions.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-module IntegrationsActions
+module Integrations::Actions
extend ActiveSupport::Concern
included do
diff --git a/app/controllers/concerns/hooks_execution.rb b/app/controllers/concerns/integrations/hooks_execution.rb
index 87d215f50e7..af039057a9c 100644
--- a/app/controllers/concerns/hooks_execution.rb
+++ b/app/controllers/concerns/integrations/hooks_execution.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-module HooksExecution
+module Integrations::HooksExecution
extend ActiveSupport::Concern
private
diff --git a/app/controllers/explore/projects_controller.rb b/app/controllers/explore/projects_controller.rb
index 3dc6a16cbc1..81e1643a8f8 100644
--- a/app/controllers/explore/projects_controller.rb
+++ b/app/controllers/explore/projects_controller.rb
@@ -68,6 +68,15 @@ class Explore::ProjectsController < Explore::ApplicationController
end
# rubocop: enable CodeReuse/ActiveRecord
+ def topic
+ load_topic
+
+ return render_404 unless @topic
+
+ params[:topic] = @topic.name
+ @projects = load_projects
+ end
+
private
def load_project_counts
@@ -86,6 +95,10 @@ class Explore::ProjectsController < Explore::ApplicationController
prepare_projects_for_rendering(projects)
end
+ def load_topic
+ @topic = Projects::Topic.find_by_name(params[:topic_name])
+ end
+
# rubocop: disable CodeReuse/ActiveRecord
def preload_associations(projects)
projects.includes(:route, :creator, :group, :project_feature, :topics, namespace: [:route, :owner])
diff --git a/app/controllers/groups/settings/integrations_controller.rb b/app/controllers/groups/settings/integrations_controller.rb
index a7a1de03224..0a63c3d304b 100644
--- a/app/controllers/groups/settings/integrations_controller.rb
+++ b/app/controllers/groups/settings/integrations_controller.rb
@@ -3,7 +3,7 @@
module Groups
module Settings
class IntegrationsController < Groups::ApplicationController
- include IntegrationsActions
+ include ::Integrations::Actions
before_action :authorize_admin_group!
diff --git a/app/controllers/projects/hook_logs_controller.rb b/app/controllers/projects/hook_logs_controller.rb
index 959fa97e562..0ca3d71f728 100644
--- a/app/controllers/projects/hook_logs_controller.rb
+++ b/app/controllers/projects/hook_logs_controller.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
class Projects::HookLogsController < Projects::ApplicationController
- include HooksExecution
+ include ::Integrations::HooksExecution
before_action :authorize_admin_project!
diff --git a/app/controllers/projects/hooks_controller.rb b/app/controllers/projects/hooks_controller.rb
index 4b4e6367a2a..c79e5a8cc85 100644
--- a/app/controllers/projects/hooks_controller.rb
+++ b/app/controllers/projects/hooks_controller.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
class Projects::HooksController < Projects::ApplicationController
- include HooksExecution
+ include ::Integrations::HooksExecution
# Authorize
before_action :authorize_admin_project!