-
Notifications
You must be signed in to change notification settings - Fork 952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Slack integration #2042
base: main
Are you sure you want to change the base?
Update Slack integration #2042
Conversation
PushEvents bool `json:"push_events"` | ||
TagPushEvents bool `json:"tag_push_events"` | ||
VulnerabilityEvents bool `json:"vulnerability_events"` | ||
WikiPageEvents bool `json:"wiki_page_events"` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should include this as well:
LabelsToBeNotified string `json:"labels_to_be_notified,omitempty"`
LabelsToBeNotifiedBehavior string `json:"labels_to_be_notified_behavior,omitempty"`
PushChannel string `json:"push_channel,omitempty"`
IssueChannel string `json:"issue_channel,omitempty"`
ConfidentialIssueChannel string `json:"confidential_issue_channel,omitempty"`
MergeRequestChannel string `json:"merge_request_channel,omitempty"`
NoteChannel string `json:"note_channel,omitempty"`
ConfidentialNoteChannel string `json:"confidential_note_channel,omitempty"`
TagPushChannel string `json:"tag_push_channel,omitempty"`
PipelineChannel string `json:"pipeline_channel,omitempty"`
WikiPageChannel string `json:"wiki_page_channel,omitempty"`
DeploymentChannel string `json:"deployment_channel,omitempty"`
IncidentChannel string `json:"incident_channel,omitempty"`
VulnerabilityChannel string `json:"vulnerability_channel,omitempty"`
AlertChannel string `json:"alert_channel,omitempty"`
aside from the missing fields i mentioned, this appears to be working. is it possible to change the |
97d833a
to
ceea2d5
Compare
Nice catch, added them to the struct 👍🏻 And no, the API doesn't return the properties on the PUT call, so it needs another GET call is you want the updated/saved properties from the server... |
it does - all the json output from our discussion in #2040 was from the |
settings := new(SlackApplication)
req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
if err != nil {
return nil, err
}
resp, err := s.client.Do(req, &settings)
fmt.Println("-- SetSlackApplication --")
fmt.Printf("Inheritted: %t\n", settings.Inherited)
fmt.Println("-- SetSlackApplication --")
|
Fixes #2039