Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

1k-off
Copy link
Contributor

@1k-off 1k-off commented Mar 2, 2024

Implements #230

return successURL, failureURL, nil
}

return s.buildWebhookStatusURLs(successURL, failureURL)
Copy link
Collaborator

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 {
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants