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
feat: webhook status urls #235
base: main
Are you sure you want to change the base?
Conversation
…ok urls for success and failure notifications
…k urls for success and failure notifications
…eat/webhook-status-urls
return successURL, failureURL, nil | ||
} | ||
|
||
return s.buildWebhookStatusURLs(successURL, failureURL) |
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 method is no impl?
And webhookStatusURLs no error return, why need error result?
url, err := s.webhookURL() | ||
if err != nil { | ||
return err | ||
} | ||
|
||
if len(notifyType) > 0 { | ||
if len(successURL) > 0 && notifyType[0] == notifyTypeSuccess { |
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.
Why not just let notifyType
is an int, this is an array but, just have one member?
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.
In the previous version there was no notifyType input at all, so I decided to use it as a variadic input parameter. This way we can ensure compatibility with the old code and provide or not provide this argument.
But yes, as you mentioned, it will be treated as an array then.
Implements #230