You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resource/service_slack: use pass through importer and start alignment with upstream API. Refs #790
This is a start towards correctly implementing the Slack Notification
Integration Service. When I started I wasn't aware of the problems in
the upstream GitLab API and the misalignment between `go-gitlab` and the
upstream GitLab API (maybe by intention because the upstream API is broken).
Long story short, there is a GitLab upstream issue here:
* https://gitlab.com/gitlab-org/gitlab/-/issues/28903
a go-gitlab issue here:
* xanzy/go-gitlab#1354
And we have one here:
* https://github.com/gitlabhq/terraform-provider-gitlab/issues/790
Nevertheless, I think we should merge this change set. It uses the pass
through importer for the resource and also cleans up a few things. In
addition I've aligned the resource schema with the upstream API and
commented out the missing parts with matching comments and links to the
issues.
I'd say we continue work on this once both GitLab and go-gitlab APIs are
fixed / aligned.
-**job_events** (Boolean) Enable notifications for job events.
66
+
-**job_events** (Boolean) Enable notifications for job events.**ATTENTION**: This attribute is currently not being submitted to the GitLab API, due to https://github.com/xanzy/go-gitlab/issues/1354.
// Description: "The name of the channel to receive confidential note events notifications.",
84
+
// Type: schema.TypeString,
85
+
// Optional: true,
86
+
// },
87
+
"confidential_note_events": {
88
+
Description: "Enable notifications for confidential note events.",
74
89
Type: schema.TypeBool,
75
90
Optional: true,
76
91
Computed: true,
77
92
},
93
+
// TODO: Currently, GitLab doesn't correctly implement the API, so this is
94
+
// impossible to implement here at the moment.
95
+
// see https://gitlab.com/gitlab-org/gitlab/-/issues/28903
96
+
// "deployment_channel": {
97
+
// Description: "The name of the channel to receive deployment events notifications.",
98
+
// Type: schema.TypeString,
99
+
// Optional: true,
100
+
// },
101
+
// "deployment_events": {
102
+
// Description: "Enable notifications for deployment events.",
103
+
// Type: schema.TypeBool,
104
+
// Optional: true,
105
+
// Computed: true,
106
+
// },
78
107
"issue_channel": {
79
108
Description: "The name of the channel to receive issue events notifications.",
80
109
Type: schema.TypeString,
81
110
Optional: true,
82
111
},
83
-
"confidential_issues_events": {
84
-
Description: "Enable notifications for confidential issues events.",
112
+
"issues_events": {
113
+
Description: "Enable notifications for issues events.",
85
114
Type: schema.TypeBool,
86
115
Optional: true,
87
116
Computed: true,
88
117
},
89
-
"confidential_issue_channel": {
90
-
Description: "The name of the channel to receive confidential issue events notifications.",
91
-
Type: schema.TypeString,
92
-
Optional: true,
93
-
},
94
-
"merge_requests_events": {
95
-
Description: "Enable notifications for merge requests events.",
118
+
// TODO: Currently, go-gitlab doesn't implement this option yet.
119
+
// see https://github.com/xanzy/go-gitlab/issues/1354
120
+
"job_events": {
121
+
Description: "Enable notifications for job events. **ATTENTION**: This attribute is currently not being submitted to the GitLab API, due to https://github.com/xanzy/go-gitlab/issues/1354.",
96
122
Type: schema.TypeBool,
97
-
Optional: true,
98
123
Computed: true,
99
124
},
100
125
"merge_request_channel": {
101
126
Description: "The name of the channel to receive merge request events notifications.",
102
127
Type: schema.TypeString,
103
128
Optional: true,
104
129
},
105
-
"tag_push_events": {
106
-
Description: "Enable notifications for tag push events.",
130
+
"merge_requests_events": {
131
+
Description: "Enable notifications for merge requests events.",
107
132
Type: schema.TypeBool,
108
133
Optional: true,
109
134
Computed: true,
110
135
},
111
-
"tag_push_channel": {
112
-
Description: "The name of the channel to receive tag push events notifications.",
136
+
"note_channel": {
137
+
Description: "The name of the channel to receive note events notifications.",
0 commit comments