if (!context.hasOthers()) {
//There is no reason to run this action on a lonely project.
return;
}
TriggeredItemEntity entity = context.getThisBuild();
GerritTrigger trigger = (GerritTrigger)entity.getProject().getTrigger(GerritTrigger.class);
if (trigger == null) {
//TODO show config error to user?
return;
}
trigger.retriggerAllBuilds(context);
response.sendRedirect2(entity.getProject().getAbsoluteUrl());
}