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

Feature/http methods #380

Merged
merged 6 commits into from
Dec 28, 2019
Merged

Conversation

moorereason
Copy link
Collaborator

The diff for hookHandler looks massive, but it's mostly whitespace. I moved the "Hook not found" response up to the top of the function and got rid of the massive if-statement. Most of the relevent changes happen before the got matched log message.

Returning early ("Hook not found") does prevent the response headers from being added to the response, but I'm assuming we didn't want that anyway if the hook wasn't found. That is a "breaking change" in this PR, but the old behavior feels more like a bug, anyway. What do you think?

@moorereason moorereason added this to the 2.7.0 milestone Dec 26, 2019
@moorereason moorereason added this to In progress in Development Dec 26, 2019
webhook.go Outdated Show resolved Hide resolved
webhook.go Outdated Show resolved Hide resolved
webhook.go Outdated Show resolved Hide resolved
webhook.go Outdated Show resolved Hide resolved
@adnanh
Copy link
Owner

adnanh commented Dec 26, 2019

Also, rebase required. 😂

The CLI HTTP methods option now sets the default allowed methods while
allowing an individual hook definition to override the default.
webhook.go Outdated Show resolved Hide resolved
@adnanh adnanh merged commit aa03dae into adnanh:development Dec 28, 2019
@moorereason moorereason moved this from In progress to Done in Development Dec 29, 2019
@moorereason moorereason deleted the feature/http-methods branch December 29, 2019 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants