1

I have added a slack service template to my gitlab-ce via the administrators interface. Everything worked. I activated "active by default". As a result, all projects now push notifications into the main channel. And those are a lot.

Changing the service template configuration is not inherit by the projects. Thus effectively rendering me unable to revert the setting via the admin UI.

So, how can I disable the slack service integrations for all projects before it drives all of us crazy because the general-channel is just flooded by gitlab?

helt
  • 4,925
  • 3
  • 35
  • 54

2 Answers2

2

That is followed by issue 40921:

Allow to apply service template to all projects

Sometimes users want to apply the same integration like JIRA across all GitLab projects, currently templates are the only way to do that through the UI, but project integration templates only works for projects that have been created after it.

Only workaround:

I had this issue too. One workaround is to patch the database like this:

sudo gitlab-rails dbconsole
UPDATE services SET properties = replace(properties, 'http://someoldurl.com', 'https://somenewurl.com');

(to be adapted to your slack setting: this is just an example)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
1

Following @VonC's advice to dive into the depths of psql and hack my way through, I finally ran following command to disable the active flag for the relevant services (slack and mattermost in our case):

sudo gitlab-rails dbconsole
UPDATE "services" SET active = FALSE WHERE type LIKE 'SlackService' AND active = TRUE;
UPDATE "services" SET active = FALSE WHERE type LIKE 'SlackSlashCommandsService' AND active = TRUE;
UPDATE "services" SET active = FALSE WHERE type LIKE 'MattermostService' AND active = TRUE;
UPDATE "services" SET active = FALSE WHERE type LIKE 'MattermostSlashCommandsService' AND active = TRUE;
helt
  • 4,925
  • 3
  • 35
  • 54