From 1014931c2c61c1c07e8933b01c58595d4bd7192c Mon Sep 17 00:00:00 2001 From: Jeff Tucker Date: Mon, 15 Dec 2025 11:31:17 -0500 Subject: [PATCH] Sort integrations by popularity Implements sorting of integrations by usage data from the last 12 months on GitLab.com. This is the first step in improving the integrations page UX to help users discover and install popular integrations more easily. Relates to #581749 --- .../settings/integrations_controller.rb | 58 ++++++++++++++++++- .../settings/integrations_controller.rb | 57 ++++++++++++++++++ 2 files changed, 114 insertions(+), 1 deletion(-) diff --git a/app/controllers/groups/settings/integrations_controller.rb b/app/controllers/groups/settings/integrations_controller.rb index 2e12e307e7923e..cf73b5658931ec 100644 --- a/app/controllers/groups/settings/integrations_controller.rb +++ b/app/controllers/groups/settings/integrations_controller.rb @@ -14,9 +14,65 @@ class IntegrationsController < Groups::ApplicationController def index @integrations = Integration .find_or_initialize_all_non_project_specific(Integration.for_group(group)) - .sort_by { |int| int.title.downcase } + .sort_by { |int| INTEGRATION_POPULARITY_ORDER.index(int.class.to_s) || Float::INFINITY } end + private + + INTEGRATION_POPULARITY_ORDER = [ + 'Integrations::JiraCloudApp', + 'Integrations::Jira', + 'Integrations::GitlabSlackApplication', + 'Integrations::Discord', + 'Integrations::Slack', + 'Integrations::Github', + 'Integrations::MicrosoftTeams', + 'Integrations::Jenkins', + 'Integrations::Telegram', + 'Integrations::PipelinesEmail', + 'Integrations::EmailsOnPush', + 'Integrations::Confluence', + 'Integrations::GoogleCloudPlatform::WorkloadIdentityFederation', + 'Integrations::HangoutsChat', + 'Integrations::Datadog', + 'Integrations::GoogleCloudPlatform::ArtifactRegistry', + 'Integrations::Youtrack', + 'Integrations::Prometheus', + 'Integrations::Clickup', + 'Integrations::ExternalWiki', + 'Integrations::Linear', + 'Integrations::Asana', + 'Integrations::Mattermost', + 'Integrations::CustomIssueTracker', + 'Integrations::AppleAppStore', + 'Integrations::Packagist', + 'Integrations::Harbor', + 'Integrations::GooglePlay', + 'Integrations::Redmine', + 'Integrations::Buildkite', + 'Integrations::SlackSlashCommands', + 'Integrations::Matrix', + 'Integrations::GitGuardian', + 'Integrations::Pushover', + 'Integrations::Assembla', + 'Integrations::Teamcity', + 'Integrations::Bamboo', + 'Integrations::WebexTeams', + 'Integrations::DroneCi', + 'Integrations::MattermostSlashCommands', + 'Integrations::Bugzilla', + 'Integrations::SquashTm', + 'Integrations::Pumble', + 'Integrations::DiffblueCover', + 'Integrations::Ewm', + 'Integrations::Campfire', + 'Integrations::Pivotaltracker', + 'Integrations::Phorge', + 'Integrations::UnifyCircuit', + 'Integrations::Irker', + 'Integrations::Zentao' + ].freeze + def edit @default_integration = Integration.default_integration(integration.type, group) diff --git a/app/controllers/projects/settings/integrations_controller.rb b/app/controllers/projects/settings/integrations_controller.rb index f4642f892fc83d..ddc70c5982cd11 100644 --- a/app/controllers/projects/settings/integrations_controller.rb +++ b/app/controllers/projects/settings/integrations_controller.rb @@ -26,8 +26,65 @@ class IntegrationsController < Projects::ApplicationController def index @integrations = @project.find_or_initialize_integrations + .sort_by { |int| INTEGRATION_POPULARITY_ORDER.index(int.class.to_s) || Float::INFINITY } end + private + + INTEGRATION_POPULARITY_ORDER = [ + 'Integrations::JiraCloudApp', + 'Integrations::Jira', + 'Integrations::GitlabSlackApplication', + 'Integrations::Discord', + 'Integrations::Slack', + 'Integrations::Github', + 'Integrations::MicrosoftTeams', + 'Integrations::Jenkins', + 'Integrations::Telegram', + 'Integrations::PipelinesEmail', + 'Integrations::EmailsOnPush', + 'Integrations::Confluence', + 'Integrations::GoogleCloudPlatform::WorkloadIdentityFederation', + 'Integrations::HangoutsChat', + 'Integrations::Datadog', + 'Integrations::GoogleCloudPlatform::ArtifactRegistry', + 'Integrations::Youtrack', + 'Integrations::Prometheus', + 'Integrations::Clickup', + 'Integrations::ExternalWiki', + 'Integrations::Linear', + 'Integrations::Asana', + 'Integrations::Mattermost', + 'Integrations::CustomIssueTracker', + 'Integrations::AppleAppStore', + 'Integrations::Packagist', + 'Integrations::Harbor', + 'Integrations::GooglePlay', + 'Integrations::Redmine', + 'Integrations::Buildkite', + 'Integrations::SlackSlashCommands', + 'Integrations::Matrix', + 'Integrations::GitGuardian', + 'Integrations::Pushover', + 'Integrations::Assembla', + 'Integrations::Teamcity', + 'Integrations::Bamboo', + 'Integrations::WebexTeams', + 'Integrations::DroneCi', + 'Integrations::MattermostSlashCommands', + 'Integrations::Bugzilla', + 'Integrations::SquashTm', + 'Integrations::Pumble', + 'Integrations::DiffblueCover', + 'Integrations::Ewm', + 'Integrations::Campfire', + 'Integrations::Pivotaltracker', + 'Integrations::Phorge', + 'Integrations::UnifyCircuit', + 'Integrations::Irker', + 'Integrations::Zentao' + ].freeze + def edit; end def update -- GitLab