Allow getting gerrit triggered builds by CommentAdded event
For now we are able to get gerrit triggered builds only on Patchset created
event, while main part of jobs are running by CommentAdded event.
Change-Id: I730951cbcc656e61c51b811895b21b79033d0809
diff --git a/src/com/mirantis/mk/Gerrit.groovy b/src/com/mirantis/mk/Gerrit.groovy
index 7c19875..33da618 100644
--- a/src/com/mirantis/mk/Gerrit.groovy
+++ b/src/com/mirantis/mk/Gerrit.groovy
@@ -201,7 +201,8 @@
return allBuilds.findAll{job ->
def cause = job.causes[0]
if(cause instanceof GerritCause &&
- cause.getEvent() instanceof com.sonymobile.tools.gerrit.gerritevents.dto.events.PatchsetCreated){
+ (cause.getEvent() instanceof com.sonymobile.tools.gerrit.gerritevents.dto.events.PatchsetCreated ||
+ cause.getEvent() instanceof com.sonymobile.tools.gerrit.gerritevents.dto.events.CommentAdded)) {
if(excludePatchset == null || excludePatchset == 0){
return cause.event.change.number.equals(String.valueOf(gerritChange))
}else{