Commit 7a29c384 authored by Patrick Rice's avatar Patrick Rice ❄️
Browse files

Merge branch 'add-slack-integration' into 'main'

Add slack integration support

Closes #2201

See merge request !2692
parents 1f279e47 ea45c06b
Loading
Loading
Loading
Loading
Loading
+114 −0
Original line number Diff line number Diff line
@@ -84,6 +84,25 @@ type (
		// https://docs.gitlab.com/api/group_integrations/#get-jira-settings
		GetGroupJiraSettings(gid any, options ...RequestOptionFunc) (*Integration, *Response, error)

		// GetGroupSlackSettings gets the Slack integration for a group.
		//
		// GitLab API docs:
		// https://docs.gitlab.com/api/group_integrations/#get-slack-settings
		GetGroupSlackSettings(gid any, options ...RequestOptionFunc) (*SlackIntegration, *Response, error)

		// SetGroupSlackSettings sets up the Slack integration for a group.
		//
		// GitLab API docs:
		// https://docs.gitlab.com/api/group_integrations/#set-up-slack
		SetGroupSlackSettings(gid any, opt *SetGroupSlackOptions, options ...RequestOptionFunc) (*SlackIntegration, *Response, error)

		// DisableGroupSlack disables the Slack integration for a group.
		// Integration settings are reset.
		//
		// GitLab API docs:
		// https://docs.gitlab.com/api/group_integrations/#disable-slack
		DisableGroupSlack(gid any, options ...RequestOptionFunc) (*Response, error)

		// GetGroupDiscordSettings gets the Discord integration settings for a group.
		//
		// GitLab API docs:
@@ -214,6 +233,44 @@ type Integration struct {
	Inherited                      bool       `json:"inherited"`
}

// SlackIntegration represents the Slack integration settings.
// It embeds the generic Integration struct and adds Slack-specific properties.
//
// GitLab API docs:
// https://docs.gitlab.com/api/group_integrations/#get-slack-settings
type SlackIntegration struct {
	Integration
	Properties SlackIntegrationProperties `json:"properties"`
}

// SlackIntegrationProperties represents Slack specific properties
// returned by the GitLab API.
//
// GitLab API docs:
// https://docs.gitlab.com/api/group_integrations/#get-slack-settings
type SlackIntegrationProperties struct {
	Username                        string `json:"username"`
	Channel                         string `json:"channel"`
	NotifyOnlyBrokenPipelines       bool   `json:"notify_only_broken_pipelines"`
	BranchesToBeNotified            string `json:"branches_to_be_notified"`
	LabelsToBeNotified              string `json:"labels_to_be_notified"`
	LabelsToBeNotifiedBehavior      string `json:"labels_to_be_notified_behavior"`
	PushChannel                     string `json:"push_channel"`
	IssueChannel                    string `json:"issue_channel"`
	ConfidentialIssueChannel        string `json:"confidential_issue_channel"`
	MergeRequestChannel             string `json:"merge_request_channel"`
	NoteChannel                     string `json:"note_channel"`
	ConfidentialNoteChannel         string `json:"confidential_note_channel"`
	TagPushChannel                  string `json:"tag_push_channel"`
	PipelineChannel                 string `json:"pipeline_channel"`
	WikiPageChannel                 string `json:"wiki_page_channel"`
	DeploymentChannel               string `json:"deployment_channel"`
	IncidentChannel                 string `json:"incident_channel"`
	AlertChannel                    string `json:"alert_channel"`
	GroupMentionChannel             string `json:"group_mention_channel"`
	GroupConfidentialMentionChannel string `json:"group_confidential_mention_channel"`
}

// DiscordIntegration represents the Discord integration settings.
//
// GitLab API docs:
@@ -498,6 +555,63 @@ func (s *IntegrationsService) GetGroupJiraSettings(gid any, options ...RequestOp
	)
}

// SetGroupSlackOptions represents the available SetGroupSlackSettings() options.
//
// GitLab API docs:
// https://docs.gitlab.com/api/group_integrations/#set-up-slack
type SetGroupSlackOptions struct {
	Webhook                         *string `url:"webhook,omitempty" json:"webhook,omitempty"`
	Username                        *string `url:"username,omitempty" json:"username,omitempty"`
	Channel                         *string `url:"channel,omitempty" json:"channel,omitempty"`
	NotifyOnlyBrokenPipelines       *bool   `url:"notify_only_broken_pipelines,omitempty" json:"notify_only_broken_pipelines,omitempty"`
	BranchesToBeNotified            *string `url:"branches_to_be_notified,omitempty" json:"branches_to_be_notified,omitempty"`
	LabelsToBeNotified              *string `url:"labels_to_be_notified,omitempty" json:"labels_to_be_notified,omitempty"`
	LabelsToBeNotifiedBehavior      *string `url:"labels_to_be_notified_behavior,omitempty" json:"labels_to_be_notified_behavior,omitempty"`
	PushChannel                     *string `url:"push_channel,omitempty" json:"push_channel,omitempty"`
	IssueChannel                    *string `url:"issue_channel,omitempty" json:"issue_channel,omitempty"`
	ConfidentialIssueChannel        *string `url:"confidential_issue_channel,omitempty" json:"confidential_issue_channel,omitempty"`
	MergeRequestChannel             *string `url:"merge_request_channel,omitempty" json:"merge_request_channel,omitempty"`
	NoteChannel                     *string `url:"note_channel,omitempty" json:"note_channel,omitempty"`
	ConfidentialNoteChannel         *string `url:"confidential_note_channel,omitempty" json:"confidential_note_channel,omitempty"`
	TagPushChannel                  *string `url:"tag_push_channel,omitempty" json:"tag_push_channel,omitempty"`
	PipelineChannel                 *string `url:"pipeline_channel,omitempty" json:"pipeline_channel,omitempty"`
	WikiPageChannel                 *string `url:"wiki_page_channel,omitempty" json:"wiki_page_channel,omitempty"`
	DeploymentChannel               *string `url:"deployment_channel,omitempty" json:"deployment_channel,omitempty"`
	IncidentChannel                 *string `url:"incident_channel,omitempty" json:"incident_channel,omitempty"`
	AlertChannel                    *string `url:"alert_channel,omitempty" json:"alert_channel,omitempty"`
	GroupMentionChannel             *string `url:"group_mention_channel,omitempty" json:"group_mention_channel,omitempty"`
	GroupConfidentialMentionChannel *string `url:"group_confidential_mention_channel,omitempty" json:"group_confidential_mention_channel,omitempty"`
}

func (s *IntegrationsService) SetGroupSlackSettings(gid any, opt *SetGroupSlackOptions, options ...RequestOptionFunc) (*SlackIntegration, *Response, error) {
	return do[*SlackIntegration](
		s.client,
		withPath("groups/%s/integrations/slack", GroupID{gid}),
		withMethod(http.MethodPut),
		withAPIOpts(opt),
		withRequestOpts(options...),
	)
}

func (s *IntegrationsService) DisableGroupSlack(gid any, options ...RequestOptionFunc) (*Response, error) {
	_, resp, err := do[none](
		s.client,
		withPath("groups/%s/integrations/slack", GroupID{gid}),
		withMethod(http.MethodDelete),
		withRequestOpts(options...),
	)
	return resp, err
}

func (s *IntegrationsService) GetGroupSlackSettings(gid any, options ...RequestOptionFunc) (*SlackIntegration, *Response, error) {
	return do[*SlackIntegration](
		s.client,
		withPath("groups/%s/integrations/slack", GroupID{gid}),
		withMethod(http.MethodGet),
		withRequestOpts(options...),
	)
}

func (s *IntegrationsService) GetGroupDiscordSettings(gid any, options ...RequestOptionFunc) (*DiscordIntegration, *Response, error) {
	return do[*DiscordIntegration](
		s.client,
+261 −0
Original line number Diff line number Diff line
@@ -548,6 +548,118 @@ func TestGetGroupJiraSettings(t *testing.T) {
	assert.Equal(t, want, integration)
}

func TestGetGroupSlackSettings(t *testing.T) {
	t.Parallel()
	mux, client := setup(t)

	mux.HandleFunc("/api/v4/groups/1/integrations/slack", func(w http.ResponseWriter, r *http.Request) {
		testMethod(t, r, http.MethodGet)
		fmt.Fprint(w, `{
			"id": 53,
			"title": "Slack notifications",
			"slug": "slack",
			"created_at": "2026-01-23T17:52:37.490Z",
			"updated_at": "2026-01-23T17:52:37.490Z",
			"active": true,
			"commit_events": true,
			"push_events": true,
			"issues_events": true,
			"incident_events": false,
			"alert_events": true,
			"confidential_issues_events": true,
			"merge_requests_events": true,
			"tag_push_events": true,
			"deployment_events": false,
			"note_events": true,
			"confidential_note_events": true,
			"pipeline_events": true,
			"wiki_page_events": true,
			"job_events": true,
			"comment_on_event_enabled": true,
			"inherited": false,
			"properties": {
				"username": "testuser",
				"channel": "general",
				"notify_only_broken_pipelines": true,
				"branches_to_be_notified": "default",
				"labels_to_be_notified": "bug",
				"labels_to_be_notified_behavior": "match_any",
				"push_channel": "push-channel",
				"issue_channel": "issue-channel",
				"confidential_issue_channel": "conf-issue-channel",
				"merge_request_channel": "mr-channel",
				"note_channel": "note-channel",
				"confidential_note_channel": "conf-note-channel",
				"tag_push_channel": "tag-push-channel",
				"pipeline_channel": "pipeline-channel",
				"wiki_page_channel": "wiki-channel",
				"deployment_channel": "deploy-channel",
				"incident_channel": "incident-channel",
				"alert_channel": "alert-channel",
				"group_mention_channel": "mention-channel",
				"group_confidential_mention_channel": "conf-mention-channel"
			}
		}`)
	})

	integration, resp, err := client.Integrations.GetGroupSlackSettings(1)
	assert.NoError(t, err)
	assert.NotNil(t, resp)

	createdAt, _ := time.Parse(time.RFC3339, "2026-01-23T17:52:37.490Z")
	updatedAt, _ := time.Parse(time.RFC3339, "2026-01-23T17:52:37.490Z")

	want := &SlackIntegration{
		Integration: Integration{
			ID:                       53,
			Title:                    "Slack notifications",
			Slug:                     "slack",
			CreatedAt:                &createdAt,
			UpdatedAt:                &updatedAt,
			Active:                   true,
			CommitEvents:             true,
			PushEvents:               true,
			IssuesEvents:             true,
			AlertEvents:              true,
			ConfidentialIssuesEvents: true,
			MergeRequestsEvents:      true,
			TagPushEvents:            true,
			DeploymentEvents:         false,
			NoteEvents:               true,
			ConfidentialNoteEvents:   true,
			PipelineEvents:           true,
			WikiPageEvents:           true,
			JobEvents:                true,
			CommentOnEventEnabled:    true,
			Inherited:                false,
			IncidentEvents:           false,
		},
		Properties: SlackIntegrationProperties{
			Username:                        "testuser",
			Channel:                         "general",
			NotifyOnlyBrokenPipelines:       true,
			BranchesToBeNotified:            "default",
			LabelsToBeNotified:              "bug",
			LabelsToBeNotifiedBehavior:      "match_any",
			PushChannel:                     "push-channel",
			IssueChannel:                    "issue-channel",
			ConfidentialIssueChannel:        "conf-issue-channel",
			MergeRequestChannel:             "mr-channel",
			NoteChannel:                     "note-channel",
			ConfidentialNoteChannel:         "conf-note-channel",
			TagPushChannel:                  "tag-push-channel",
			PipelineChannel:                 "pipeline-channel",
			WikiPageChannel:                 "wiki-channel",
			DeploymentChannel:               "deploy-channel",
			IncidentChannel:                 "incident-channel",
			AlertChannel:                    "alert-channel",
			GroupMentionChannel:             "mention-channel",
			GroupConfidentialMentionChannel: "conf-mention-channel",
		},
	}
	assert.Equal(t, want, integration)
}

func TestGetGroupDiscordSettings(t *testing.T) {
	t.Parallel()
	mux, client := setup(t)
@@ -598,6 +710,155 @@ func TestGetGroupTelegramSettings(t *testing.T) {
	assert.Equal(t, "default", integration.Properties.BranchesToBeNotified)
}

func TestSetGroupSlackSettings(t *testing.T) {
	t.Parallel()
	mux, client := setup(t)

	mux.HandleFunc("/api/v4/groups/1/integrations/slack", func(w http.ResponseWriter, r *http.Request) {
		testMethod(t, r, http.MethodPut)
		fmt.Fprint(w, `{
			"id": 53,
			"title": "Slack notifications",
			"slug": "slack",
			"created_at": "2026-01-23T17:52:37.490Z",
			"updated_at": "2026-01-23T17:52:37.490Z",
			"active": true,
			"commit_events": true,
			"push_events": true,
			"issues_events": true,
			"incident_events": false,
			"alert_events": true,
			"confidential_issues_events": true,
			"merge_requests_events": true,
			"tag_push_events": true,
			"deployment_events": false,
			"note_events": true,
			"confidential_note_events": true,
			"pipeline_events": true,
			"wiki_page_events": true,
			"job_events": true,
			"comment_on_event_enabled": true,
			"inherited": false,
			"properties": {
				"username": "testuser",
				"channel": "general",
				"notify_only_broken_pipelines": true,
				"branches_to_be_notified": "default",
				"labels_to_be_notified": "bug",
				"labels_to_be_notified_behavior": "match_any",
				"push_channel": "push-channel",
				"issue_channel": "issue-channel",
				"confidential_issue_channel": "conf-issue-channel",
				"merge_request_channel": "mr-channel",
				"note_channel": "note-channel",
				"confidential_note_channel": "conf-note-channel",
				"tag_push_channel": "tag-push-channel",
				"pipeline_channel": "pipeline-channel",
				"wiki_page_channel": "wiki-channel",
				"deployment_channel": "deploy-channel",
				"incident_channel": "incident-channel",
				"alert_channel": "alert-channel",
				"group_mention_channel": "mention-channel",
				"group_confidential_mention_channel": "conf-mention-channel"
			}
		}`)
	})

	opt := &SetGroupSlackOptions{
		Webhook:                         Ptr("https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"),
		Username:                        Ptr("testuser"),
		Channel:                         Ptr("general"),
		NotifyOnlyBrokenPipelines:       Ptr(true),
		BranchesToBeNotified:            Ptr("default"),
		LabelsToBeNotified:              Ptr("bug"),
		LabelsToBeNotifiedBehavior:      Ptr("match_any"),
		PushChannel:                     Ptr("push-channel"),
		IssueChannel:                    Ptr("issue-channel"),
		ConfidentialIssueChannel:        Ptr("conf-issue-channel"),
		MergeRequestChannel:             Ptr("mr-channel"),
		NoteChannel:                     Ptr("note-channel"),
		ConfidentialNoteChannel:         Ptr("conf-note-channel"),
		TagPushChannel:                  Ptr("tag-push-channel"),
		PipelineChannel:                 Ptr("pipeline-channel"),
		WikiPageChannel:                 Ptr("wiki-channel"),
		DeploymentChannel:               Ptr("deploy-channel"),
		IncidentChannel:                 Ptr("incident-channel"),
		AlertChannel:                    Ptr("alert-channel"),
		GroupMentionChannel:             Ptr("mention-channel"),
		GroupConfidentialMentionChannel: Ptr("conf-mention-channel"),
	}

	integration, resp, err := client.Integrations.SetGroupSlackSettings(1, opt)
	assert.NoError(t, err)
	assert.NotNil(t, resp)

	createdAt, _ := time.Parse(time.RFC3339, "2026-01-23T17:52:37.490Z")
	updatedAt, _ := time.Parse(time.RFC3339, "2026-01-23T17:52:37.490Z")

	want := &SlackIntegration{
		Integration: Integration{
			ID:                       53,
			Title:                    "Slack notifications",
			Slug:                     "slack",
			CreatedAt:                &createdAt,
			UpdatedAt:                &updatedAt,
			Active:                   true,
			CommitEvents:             true,
			PushEvents:               true,
			IssuesEvents:             true,
			AlertEvents:              true,
			ConfidentialIssuesEvents: true,
			MergeRequestsEvents:      true,
			TagPushEvents:            true,
			DeploymentEvents:         false,
			NoteEvents:               true,
			ConfidentialNoteEvents:   true,
			PipelineEvents:           true,
			WikiPageEvents:           true,
			JobEvents:                true,
			CommentOnEventEnabled:    true,
			Inherited:                false,
			IncidentEvents:           false,
		},
		Properties: SlackIntegrationProperties{
			Username:                        "testuser",
			Channel:                         "general",
			NotifyOnlyBrokenPipelines:       true,
			BranchesToBeNotified:            "default",
			LabelsToBeNotified:              "bug",
			LabelsToBeNotifiedBehavior:      "match_any",
			PushChannel:                     "push-channel",
			IssueChannel:                    "issue-channel",
			ConfidentialIssueChannel:        "conf-issue-channel",
			MergeRequestChannel:             "mr-channel",
			NoteChannel:                     "note-channel",
			ConfidentialNoteChannel:         "conf-note-channel",
			TagPushChannel:                  "tag-push-channel",
			PipelineChannel:                 "pipeline-channel",
			WikiPageChannel:                 "wiki-channel",
			DeploymentChannel:               "deploy-channel",
			IncidentChannel:                 "incident-channel",
			AlertChannel:                    "alert-channel",
			GroupMentionChannel:             "mention-channel",
			GroupConfidentialMentionChannel: "conf-mention-channel",
		},
	}
	assert.Equal(t, want, integration)
}

func TestDisableGroupSlack(t *testing.T) {
	t.Parallel()
	mux, client := setup(t)

	mux.HandleFunc("/api/v4/groups/1/integrations/slack", func(w http.ResponseWriter, r *http.Request) {
		testMethod(t, r, http.MethodDelete)
	})

	resp, err := client.Integrations.DisableGroupSlack(1)
	assert.NoError(t, err)
	assert.NotNil(t, resp)
}

func TestGetGroupMattermostSettings(t *testing.T) {
	t.Parallel()
	mux, client := setup(t)
+134 −0
Original line number Diff line number Diff line
@@ -259,6 +259,50 @@ func (c *MockIntegrationsServiceInterfaceDisableGroupMicrosoftTeamsNotifications
	return c
}

// DisableGroupSlack mocks base method.
func (m *MockIntegrationsServiceInterface) DisableGroupSlack(gid any, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error) {
	m.ctrl.T.Helper()
	varargs := []any{gid}
	for _, a := range options {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "DisableGroupSlack", varargs...)
	ret0, _ := ret[0].(*gitlab.Response)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// DisableGroupSlack indicates an expected call of DisableGroupSlack.
func (mr *MockIntegrationsServiceInterfaceMockRecorder) DisableGroupSlack(gid any, options ...any) *MockIntegrationsServiceInterfaceDisableGroupSlackCall {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{gid}, options...)
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisableGroupSlack", reflect.TypeOf((*MockIntegrationsServiceInterface)(nil).DisableGroupSlack), varargs...)
	return &MockIntegrationsServiceInterfaceDisableGroupSlackCall{Call: call}
}

// MockIntegrationsServiceInterfaceDisableGroupSlackCall wrap *gomock.Call
type MockIntegrationsServiceInterfaceDisableGroupSlackCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockIntegrationsServiceInterfaceDisableGroupSlackCall) Return(arg0 *gitlab.Response, arg1 error) *MockIntegrationsServiceInterfaceDisableGroupSlackCall {
	c.Call = c.Call.Return(arg0, arg1)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockIntegrationsServiceInterfaceDisableGroupSlackCall) Do(f func(any, ...gitlab.RequestOptionFunc) (*gitlab.Response, error)) *MockIntegrationsServiceInterfaceDisableGroupSlackCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockIntegrationsServiceInterfaceDisableGroupSlackCall) DoAndReturn(f func(any, ...gitlab.RequestOptionFunc) (*gitlab.Response, error)) *MockIntegrationsServiceInterfaceDisableGroupSlackCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// DisableGroupWebexTeams mocks base method.
func (m *MockIntegrationsServiceInterface) DisableGroupWebexTeams(gid any, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error) {
	m.ctrl.T.Helper()
@@ -708,6 +752,51 @@ func (c *MockIntegrationsServiceInterfaceGetGroupMicrosoftTeamsNotificationsCall
	return c
}

// GetGroupSlackSettings mocks base method.
func (m *MockIntegrationsServiceInterface) GetGroupSlackSettings(gid any, options ...gitlab.RequestOptionFunc) (*gitlab.SlackIntegration, *gitlab.Response, error) {
	m.ctrl.T.Helper()
	varargs := []any{gid}
	for _, a := range options {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "GetGroupSlackSettings", varargs...)
	ret0, _ := ret[0].(*gitlab.SlackIntegration)
	ret1, _ := ret[1].(*gitlab.Response)
	ret2, _ := ret[2].(error)
	return ret0, ret1, ret2
}

// GetGroupSlackSettings indicates an expected call of GetGroupSlackSettings.
func (mr *MockIntegrationsServiceInterfaceMockRecorder) GetGroupSlackSettings(gid any, options ...any) *MockIntegrationsServiceInterfaceGetGroupSlackSettingsCall {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{gid}, options...)
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetGroupSlackSettings", reflect.TypeOf((*MockIntegrationsServiceInterface)(nil).GetGroupSlackSettings), varargs...)
	return &MockIntegrationsServiceInterfaceGetGroupSlackSettingsCall{Call: call}
}

// MockIntegrationsServiceInterfaceGetGroupSlackSettingsCall wrap *gomock.Call
type MockIntegrationsServiceInterfaceGetGroupSlackSettingsCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockIntegrationsServiceInterfaceGetGroupSlackSettingsCall) Return(arg0 *gitlab.SlackIntegration, arg1 *gitlab.Response, arg2 error) *MockIntegrationsServiceInterfaceGetGroupSlackSettingsCall {
	c.Call = c.Call.Return(arg0, arg1, arg2)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockIntegrationsServiceInterfaceGetGroupSlackSettingsCall) Do(f func(any, ...gitlab.RequestOptionFunc) (*gitlab.SlackIntegration, *gitlab.Response, error)) *MockIntegrationsServiceInterfaceGetGroupSlackSettingsCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockIntegrationsServiceInterfaceGetGroupSlackSettingsCall) DoAndReturn(f func(any, ...gitlab.RequestOptionFunc) (*gitlab.SlackIntegration, *gitlab.Response, error)) *MockIntegrationsServiceInterfaceGetGroupSlackSettingsCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// GetGroupTelegramSettings mocks base method.
func (m *MockIntegrationsServiceInterface) GetGroupTelegramSettings(gid any, options ...gitlab.RequestOptionFunc) (*gitlab.TelegramIntegration, *gitlab.Response, error) {
	m.ctrl.T.Helper()
@@ -978,6 +1067,51 @@ func (c *MockIntegrationsServiceInterfaceSetGroupMicrosoftTeamsNotificationsCall
	return c
}

// SetGroupSlackSettings mocks base method.
func (m *MockIntegrationsServiceInterface) SetGroupSlackSettings(gid any, opt *gitlab.SetGroupSlackOptions, options ...gitlab.RequestOptionFunc) (*gitlab.SlackIntegration, *gitlab.Response, error) {
	m.ctrl.T.Helper()
	varargs := []any{gid, opt}
	for _, a := range options {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "SetGroupSlackSettings", varargs...)
	ret0, _ := ret[0].(*gitlab.SlackIntegration)
	ret1, _ := ret[1].(*gitlab.Response)
	ret2, _ := ret[2].(error)
	return ret0, ret1, ret2
}

// SetGroupSlackSettings indicates an expected call of SetGroupSlackSettings.
func (mr *MockIntegrationsServiceInterfaceMockRecorder) SetGroupSlackSettings(gid, opt any, options ...any) *MockIntegrationsServiceInterfaceSetGroupSlackSettingsCall {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{gid, opt}, options...)
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetGroupSlackSettings", reflect.TypeOf((*MockIntegrationsServiceInterface)(nil).SetGroupSlackSettings), varargs...)
	return &MockIntegrationsServiceInterfaceSetGroupSlackSettingsCall{Call: call}
}

// MockIntegrationsServiceInterfaceSetGroupSlackSettingsCall wrap *gomock.Call
type MockIntegrationsServiceInterfaceSetGroupSlackSettingsCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockIntegrationsServiceInterfaceSetGroupSlackSettingsCall) Return(arg0 *gitlab.SlackIntegration, arg1 *gitlab.Response, arg2 error) *MockIntegrationsServiceInterfaceSetGroupSlackSettingsCall {
	c.Call = c.Call.Return(arg0, arg1, arg2)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockIntegrationsServiceInterfaceSetGroupSlackSettingsCall) Do(f func(any, *gitlab.SetGroupSlackOptions, ...gitlab.RequestOptionFunc) (*gitlab.SlackIntegration, *gitlab.Response, error)) *MockIntegrationsServiceInterfaceSetGroupSlackSettingsCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockIntegrationsServiceInterfaceSetGroupSlackSettingsCall) DoAndReturn(f func(any, *gitlab.SetGroupSlackOptions, ...gitlab.RequestOptionFunc) (*gitlab.SlackIntegration, *gitlab.Response, error)) *MockIntegrationsServiceInterfaceSetGroupSlackSettingsCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// SetGroupWebexTeamsSettings mocks base method.
func (m *MockIntegrationsServiceInterface) SetGroupWebexTeamsSettings(gid any, opt *gitlab.SetGroupWebexTeamsOptions, options ...gitlab.RequestOptionFunc) (*gitlab.WebexTeamsIntegration, *gitlab.Response, error) {
	m.ctrl.T.Helper()