jenkinsci / groovy-events-listener-plugin

A Jenkins plugin, which executes groovy code when an event occurs.
https://plugins.jenkins.io/groovy-events-listener-plugin/
MIT License
36 stars 34 forks source link

Pre-pull request review #17

Closed nickgrealy closed 8 years ago

nickgrealy commented 8 years ago

@llaaiiqq has asked if we can provide some thoughts/insight/feedback before he submits a pull request:

I've extended it to listen to node online/offline events and job queue events. Code is on my fork. I haven't submitted a PR yet because I want to clean things up a bit first - adding nine more event types added a lot of boilerplate code, and I'd like to refactor things to trim it down.

I was wondering if you had any thoughts on where you'd like to see things go before I dive in.

Fork is here: https://github.com/llaaiiqq/groovy-events-listener-plugin/commits/master

@Jimilian - just wanted your input as well, as you've been large contributor to date.

nickgrealy commented 8 years ago

First of all, thanks for taking the time to contribute! It's much appreciated, and I'm sure it will help others.

Having a quick look at the code:

Things I'd like to see:

Things I need to add:

nickgrealy commented 8 years ago

Screenshot... is length of the config widget going to be a problem here/are there any other display options?

Otherwise, looks good.

groovy-events-listener-plugin

Jimilian commented 8 years ago

Code looks very good! Especially after refactoring for boilerplate code! @llaaiiqq, you did a great job!

Btw, can we add events in same interface as Jenkins does for "build steps"? Just list where you can pick up only one element.

nickgrealy commented 8 years ago

Btw, can we add events in same interface as Jenkins does for "build steps"?

@Jimilian - Do you mean using an "Add" button (like below), to add events that will be listened to? (If so, sounds great! Can you throw something together?)

screen shot 2016-06-15 at 10 27 30 pm

llaaiiqq commented 8 years ago

Thanks for the feedback folks! PR incoming in a minute.

Regarding the config widget length - yeah, that going to get unmanageable in a hurry. Maybe just have all events always enabled and let the user pick and choose in their event handling script?

Jimilian commented 8 years ago

@nickgrealy Yes, I was talking about it, unfortunately, I'm not a Jelly expert. Probably, we can ask on Jenkins-dev.

@llaaiiqq It's a bad idea, because it will create huge overhead. Especially if synchronized is enabled.