Skip to content
Snippets Groups Projects
Commit d5432b48 authored by Z.J. van de Weg's avatar Z.J. van de Weg
Browse files

Remove Mattermost team with GitLab group

When destroying a group, now an API call is made to the Mattermost
server to request the deletion of the project.
parent 20987f4f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -22,6 +22,10 @@ module Groups
DestroyService.new(group, current_user).execute
end
 
if group.chat_team
Mattermost::Team.new(current_user).destroy(@group.chat_team.team_id)
end
group.really_destroy!
end
end
Loading
Loading
---
title: Remove Mattermost team when deleting a group
merge_request:
author:
Loading
Loading
@@ -36,6 +36,12 @@ module Mattermost
end
end
 
def session_delete(path, options = {})
with_session do |session|
delete(session, path, options)
end
end
def json_response(response)
json_response = JSON.parse(response.body)
 
Loading
Loading
Loading
Loading
@@ -14,5 +14,9 @@ module Mattermost
type: type
}.to_json)
end
def destroy(team_id:)
session_delete("/api/v4/teams/#{team}")
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment