Skip to content
This repository was archived by the owner on Dec 10, 2024. It is now read-only.

Commit ceea2d5

Browse files
committed
Update Slack integration
Fixes #2039
1 parent 56c0535 commit ceea2d5

File tree

1 file changed

+75
-53
lines changed

1 file changed

+75
-53
lines changed

services.go

+75-53
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,31 @@ type ServicesService struct {
3636
//
3737
// GitLab API docs: https://docs.gitlab.com/ee/api/integrations.html
3838
type Service struct {
39-
ID int `json:"id"`
40-
Title string `json:"title"`
41-
Slug string `json:"slug"`
42-
CreatedAt *time.Time `json:"created_at"`
43-
UpdatedAt *time.Time `json:"updated_at"`
44-
Active bool `json:"active"`
45-
PushEvents bool `json:"push_events"`
46-
IssuesEvents bool `json:"issues_events"`
47-
AlertEvents bool `json:"alert_events"`
48-
ConfidentialIssuesEvents bool `json:"confidential_issues_events"`
49-
CommitEvents bool `json:"commit_events"`
50-
MergeRequestsEvents bool `json:"merge_requests_events"`
51-
CommentOnEventEnabled bool `json:"comment_on_event_enabled"`
52-
TagPushEvents bool `json:"tag_push_events"`
53-
NoteEvents bool `json:"note_events"`
54-
ConfidentialNoteEvents bool `json:"confidential_note_events"`
55-
PipelineEvents bool `json:"pipeline_events"`
56-
JobEvents bool `json:"job_events"`
57-
WikiPageEvents bool `json:"wiki_page_events"`
58-
VulnerabilityEvents bool `json:"vulnerability_events"`
59-
DeploymentEvents bool `json:"deployment_events"`
39+
ID int `json:"id"`
40+
Title string `json:"title"`
41+
Slug string `json:"slug"`
42+
CreatedAt *time.Time `json:"created_at"`
43+
UpdatedAt *time.Time `json:"updated_at"`
44+
Active bool `json:"active"`
45+
AlertEvents bool `json:"alert_events"`
46+
CommitEvents bool `json:"commit_events"`
47+
ConfidentialIssuesEvents bool `json:"confidential_issues_events"`
48+
ConfidentialNoteEvents bool `json:"confidential_note_events"`
49+
DeploymentEvents bool `json:"deployment_events"`
50+
GroupConfidentialMentionEvents bool `json:"group_confidential_mention_events"`
51+
GroupMentionEvents bool `json:"group_mention_events"`
52+
IncidentEvents bool `json:"incident_events"`
53+
IssuesEvents bool `json:"issues_events"`
54+
JobEvents bool `json:"job_events"`
55+
MergeRequestsEvents bool `json:"merge_requests_events"`
56+
NoteEvents bool `json:"note_events"`
57+
PipelineEvents bool `json:"pipeline_events"`
58+
PushEvents bool `json:"push_events"`
59+
TagPushEvents bool `json:"tag_push_events"`
60+
VulnerabilityEvents bool `json:"vulnerability_events"`
61+
WikiPageEvents bool `json:"wiki_page_events"`
62+
CommentOnEventEnabled bool `json:"comment_on_event_enabled"`
63+
Inherited bool `json:"inherited"`
6064
}
6165

6266
// ListServices gets a list of all active services.
@@ -878,22 +882,24 @@ type SlackApplication struct {
878882
// GitLab API docs:
879883
// https://docs.gitlab.com/ee/api/integrations.html#gitlab-for-slack-app
880884
type SlackApplicationProperties struct {
881-
Channel string `json:"channel"`
882-
NotifyOnlyBrokenPipelines bool `json:"notify_only_broken_pipelines"`
883-
BranchesToBeNotified string `json:"branches_to_be_notified"`
884-
AlertEvents bool `json:"alert_events"`
885-
IssuesEvents bool `json:"issues_events"`
886-
ConfidentialIssuesEvents bool `json:"confidential_issues_events"`
887-
MergeRequestsEvents bool `json:"merge_requests_events"`
888-
NoteEvents bool `json:"note_events"`
889-
ConfidentialNoteEvents bool `json:"confidential_note_events"`
890-
DeploymentEvents bool `json:"deployment_events"`
891-
IncidentsEvents bool `json:"incidents_events"`
892-
PipelineEvents bool `json:"pipeline_events"`
893-
PushEvents bool `json:"push_events"`
894-
TagPushEvents bool `json:"tag_push_events"`
895-
VulnerabilityEvents bool `json:"vulnerability_events"`
896-
WikiPageEvents bool `json:"wiki_page_events"`
885+
Channel string `json:"channel"`
886+
NotifyOnlyBrokenPipelines bool `json:"notify_only_broken_pipelines"`
887+
BranchesToBeNotified string `json:"branches_to_be_notified"`
888+
LabelsToBeNotified string `json:"labels_to_be_notified"`
889+
LabelsToBeNotifiedBehavior string `json:"labels_to_be_notified_behavior"`
890+
PushChannel string `json:"push_channel"`
891+
IssueChannel string `json:"issue_channel"`
892+
ConfidentialIssueChannel string `json:"confidential_issue_channel"`
893+
MergeRequestChannel string `json:"merge_request_channel"`
894+
NoteChannel string `json:"note_channel"`
895+
ConfidentialNoteChannel string `json:"confidential_note_channel"`
896+
TagPushChannel string `json:"tag_push_channel"`
897+
PipelineChannel string `json:"pipeline_channel"`
898+
WikiPageChannel string `json:"wiki_page_channel"`
899+
DeploymentChannel string `json:"deployment_channel"`
900+
IncidentChannel string `json:"incident_channel"`
901+
VulnerabilityChannel string `json:"vulnerability_channel"`
902+
AlertChannel string `json:"alert_channel"`
897903

898904
// Deprecated: This parameter has been replaced with BranchesToBeNotified.
899905
NotifyOnlyDefaultBranch bool `json:"notify_only_default_branch"`
@@ -931,22 +937,38 @@ func (s *ServicesService) GetSlackApplication(pid interface{}, options ...Reques
931937
// GitLab API docs:
932938
// https://docs.gitlab.com/ee/api/integrations.html#set-up-gitlab-for-slack-app
933939
type SetSlackApplicationOptions struct {
934-
Channel *string `url:"channel,omitempty" json:"channel,omitempty"`
935-
NotifyOnlyBrokenPipelines *bool `url:"notify_only_broken_pipelines,omitempty" json:"notify_only_broken_pipelines,omitempty"`
936-
BranchesToBeNotified *string `url:"branches_to_be_notified,omitempty" json:"branches_to_be_notified,omitempty"`
937-
AlertEvents *bool `url:"alert_events,omitempty" json:"alert_events,omitempty"`
938-
IssuesEvents *bool `url:"issues_events,omitempty" json:"issues_events,omitempty"`
939-
ConfidentialIssuesEvents *bool `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"`
940-
MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"`
941-
NoteEvents *bool `url:"note_events,omitempty" json:"note_events,omitempty"`
942-
ConfidentialNoteEvents *bool `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"`
943-
DeploymentEvents *bool `url:"deployment_events,omitempty" json:"deployment_events,omitempty"`
944-
IncidentsEvents *bool `url:"incidents_events,omitempty" json:"incidents_events,omitempty"`
945-
PipelineEvents *bool `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"`
946-
PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"`
947-
TagPushEvents *bool `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"`
948-
VulnerabilityEvents *bool `url:"vulnerability_events,omitempty" json:"vulnerability_events,omitempty"`
949-
WikiPageEvents *bool `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"`
940+
Channel *string `url:"channel,omitempty" json:"channel,omitempty"`
941+
NotifyOnlyBrokenPipelines *bool `url:"notify_only_broken_pipelines,omitempty" json:"notify_only_broken_pipelines,omitempty"`
942+
BranchesToBeNotified *string `url:"branches_to_be_notified,omitempty" json:"branches_to_be_notified,omitempty"`
943+
AlertEvents *bool `url:"alert_events,omitempty" json:"alert_events,omitempty"`
944+
IssuesEvents *bool `url:"issues_events,omitempty" json:"issues_events,omitempty"`
945+
ConfidentialIssuesEvents *bool `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"`
946+
MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"`
947+
NoteEvents *bool `url:"note_events,omitempty" json:"note_events,omitempty"`
948+
ConfidentialNoteEvents *bool `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"`
949+
DeploymentEvents *bool `url:"deployment_events,omitempty" json:"deployment_events,omitempty"`
950+
IncidentsEvents *bool `url:"incidents_events,omitempty" json:"incidents_events,omitempty"`
951+
PipelineEvents *bool `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"`
952+
PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"`
953+
TagPushEvents *bool `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"`
954+
VulnerabilityEvents *bool `url:"vulnerability_events,omitempty" json:"vulnerability_events,omitempty"`
955+
WikiPageEvents *bool `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"`
956+
LabelsToBeNotified *string `url:"labels_to_be_notified,omitempty" json:"labels_to_be_notified,omitempty"`
957+
LabelsToBeNotifiedBehavior *string `url:"labels_to_be_notified_behavior,omitempty" json:"labels_to_be_notified_behavior,omitempty"`
958+
PushChannel *string `url:"push_channel,omitempty" json:"push_channel,omitempty"`
959+
IssueChannel *string `url:"issue_channel,omitempty" json:"issue_channel,omitempty"`
960+
ConfidentialIssueChannel *string `url:"confidential_issue_channel,omitempty" json:"confidential_issue_channel,omitempty"`
961+
MergeRequestChannel *string `url:"merge_request_channel,omitempty" json:"merge_request_channel,omitempty"`
962+
NoteChannel *string `url:"note_channel,omitempty" json:"note_channel,omitempty"`
963+
ConfidentialNoteChannel *string `url:"confidential_note_channel,omitempty" json:"confidential_note_channel,omitempty"`
964+
TagPushChannel *string `url:"tag_push_channel,omitempty" json:"tag_push_channel,omitempty"`
965+
PipelineChannel *string `url:"pipeline_channel,omitempty" json:"pipeline_channel,omitempty"`
966+
WikiPageChannel *string `url:"wiki_page_channel,omitempty" json:"wiki_page_channel,omitempty"`
967+
DeploymentChannel *string `url:"deployment_channel,omitempty" json:"deployment_channel,omitempty"`
968+
IncidentChannel *string `url:"incident_channel,omitempty" json:"incident_channel,omitempty"`
969+
VulnerabilityChannel *string `url:"vulnerability_channel,omitempty" json:"vulnerability_channel,omitempty"`
970+
AlertChannel *string `url:"alert_channel,omitempty" json:"alert_channel,omitempty"`
971+
UseInheritedSettings *bool `url:"use_inherited_settings,omitempty" json:"use_inherited_settings,omitempty"`
950972

951973
// Deprecated: This parameter has been replaced with BranchesToBeNotified.
952974
NotifyOnlyDefaultBranch *bool `url:"notify_only_default_branch,omitempty" json:"notify_only_default_branch,omitempty"`

0 commit comments

Comments
 (0)