-
Notifications
You must be signed in to change notification settings - Fork 1
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
Webhooks support. #18
base: staging
Are you sure you want to change the base?
Conversation
Refactored PR structs to carry the original request and its headers.
@danielgomezrico plz review! |
@@ -50,10 +50,10 @@ func TestLoadConfig(t *testing.T) { | |||
assert.Ok(t, err) | |||
defer os.Remove(configPath) | |||
|
|||
config, err := Load(configPath) | |||
loadedConf, err := Load(configPath) |
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.
+1 to name it loadedConfig
instead of loadedConf
} | ||
|
||
// NormalizePRPayload turns a bitbucket-specific PR payload into a general one. | ||
func NormalizePRPayload(next http.Handler) http.Handler { | ||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | ||
pr := new(PullRequest) |
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.
A PullRequest is nothing if is not Hidrated?
if so why not add some build static functions to create a new pull request from the PullRequest instead?
- PullRequest.fromBitbucket(request)
- PullRequest.fromGithub(request)
No description provided.