diff options
Diffstat (limited to 'app/controllers/groups/settings')
-rw-r--r-- | app/controllers/groups/settings/integrations_controller.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/app/controllers/groups/settings/integrations_controller.rb b/app/controllers/groups/settings/integrations_controller.rb index adfbe9bfa17..e8551a7f270 100644 --- a/app/controllers/groups/settings/integrations_controller.rb +++ b/app/controllers/groups/settings/integrations_controller.rb @@ -8,15 +8,19 @@ module Groups before_action :authorize_admin_group! def index - @integrations = [] + @integrations = Service.find_or_initialize_all(Service.for_group(group)).sort_by(&:title) + end + + def edit + @default_integration = Service.default_integration(integration.type, group) + + super end private - # TODO: Make this compatible with group-level integration - # https://gitlab.com/groups/gitlab-org/-/epics/2543 def find_or_initialize_integration(name) - Project.first.find_or_initialize_service(name) + Service.find_or_initialize_integration(name, group_id: group.id) end def integrations_enabled? |