mohamicorp / stash-jenkins-postreceive-webhook

Webhook used to notify Jenkins when commits are made to Stash
Other
138 stars 98 forks source link

Added support for opened and reopened pull requests #43

Closed melvyndekort closed 10 years ago

melvyndekort commented 10 years ago

Please check if you think it needs any changes, I've also created unit-tests (slightly modified copies from your existing test)

mikesir87 commented 10 years ago

Ok. One suggestion... instead of having several listeners, how about we have one listener class that has multiple EventListener annotations for each event type we're interested in, then delegate to a handleEvent method (which accepts a PullRequestEvent) that does the work. Would reduce the amount of code and tests and increase the code reuse.

I can either do it or you can. Got a preference? I figured I'd let you so you get the credit for the work ;)

melvyndekort commented 10 years ago

Sounds like a nice improvement. But it's mainly your code, and I'm not in it for the credits. If you don't mind making the modifications, I suggest you do it.

mikesir87 commented 10 years ago

Ok. Will do. Thanks! In the mean time, I'll go ahead and just close this pull request. Thanks though!

melvyndekort commented 10 years ago

You're welcome, if you need anything else, don't hesitate to ask ;-)