Examples of PluginCommentAddedEvent


Examples of com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedEvent

            throws Exception {
        FreeStyleProject p = rule.createFreeStyleProject(name);
        List<GerritProject> projects = new LinkedList<GerritProject>();
        projects.add(new GerritProject(CompareType.ANT, "**",
                Collections.singletonList(new Branch(CompareType.ANT, "**")), null, null, null));
        PluginCommentAddedEvent event = new PluginCommentAddedEvent("CRVW", "1");
        List<PluginGerritEvent> list = new LinkedList<PluginGerritEvent>();
        list.add(event);
        p.addTrigger(new GerritTrigger(projects, null,
                null, null, null, null, null, null, null, null, null, null,
                false, false, true, false, false, null, null, null, null, null, null, null,
View Full Code Here

Examples of com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedEvent

     *
     * @param event the event.
     * @return true if the event matches the approval category and value configured.
     */
    private boolean commentAddedMatch(CommentAdded event) {
        PluginCommentAddedEvent commentAdded = null;
        for (PluginGerritEvent e : triggerOnEvents) {
            if (e instanceof PluginCommentAddedEvent) {
                commentAdded = (PluginCommentAddedEvent)e;
                for (Approval approval : event.getApprovals()) {
                    if (approval.getType().equals(commentAdded.getVerdictCategory())
                        && (approval.getValue().equals(commentAdded.getCommentAddedTriggerApprovalValue())
                        || ("+" + approval.getValue()).equals(commentAdded.getCommentAddedTriggerApprovalValue()))) {
                    return true;
                    }
                }
            }
            if (e instanceof PluginCommentAddedContainsEvent) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.