mohamicorp / stash-jenkins-postreceive-webhook

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

Issue #38 : added forgotten code #44

Closed melvyndekort closed 10 years ago

melvyndekort commented 10 years ago

IsMergeableEligibilityFilter now copes with all 3 types of PullRequestEvents

mikesir87 commented 10 years ago

Thanks again for a pull request! :)

I am actually just about done with a little refactor. I went ahead and split this into two filters. The IsMergeableEligibilityFilter now only checks that the pull request is mergable. This lets the eventSource to only need to be checked as a PullRequestEvent.

Then, I made another filter called a PullRequestRescopeFilter that then does the "from-side" checking, but only for PullRequestRescopedEvents

Makes the unit testing much cleaner and I think keeps keep code a little cleaner as each filter only does one thing, which is what I'd like to do.

Code should be up within 10ish minutes. Just finishing unit tests.

melvyndekort commented 10 years ago

Nice job!