Examples of GitHubPushCause


Examples of com.groupon.jenkins.dynamic.build.cause.GitHubPushCause

    }

    @Test
    public void should_not_attempt_sending_an_email_only_if_github_push_and_email_not_configured() {
        PusherEmailNotifier pusherEmailNotifier = new PusherEmailNotifier();
        GitHubPushCause githubCause = mock(GitHubPushCause.class);
        when(githubCause.getPusherEmailAddress()).thenReturn(null);
        when(build.getCause(GitHubPushCause.class)).thenReturn(githubCause);
        assertFalse(pusherEmailNotifier.needsEmail(build, listener));
    }
View Full Code Here

Examples of com.groupon.jenkins.dynamic.build.cause.GitHubPushCause

    }

    @Test
    public void should_attempt_sending_an_email_only_if_github_push_and_email_configured() {
        PusherEmailNotifier pusherEmailNotifier = new PusherEmailNotifier();
        GitHubPushCause githubCause = mock(GitHubPushCause.class);
        when(githubCause.getPusherEmailAddress()).thenReturn("surya@groupon.com");
        when(build.getCause(GitHubPushCause.class)).thenReturn(githubCause);
        assertTrue(pusherEmailNotifier.needsEmail(build, listener));
    }
View Full Code Here

Examples of com.groupon.jenkins.dynamic.build.cause.GitHubPushCause

            return new GitHubPullRequestCause(this, getSha(), label, number);

        } else {
            final String pusherName = payloadJson.getJSONObject("pusher").getString("name");
            final String email = payloadJson.getJSONObject("pusher").getString("email");
            return new GitHubPushCause(this, getSha(), pusherName, email);
        }
    }
View Full Code Here

Examples of com.groupon.jenkins.dynamic.build.cause.GitHubPushCause

    public boolean needsEmail(DynamicBuild build, BuildListener listener) {
        return StringUtils.isNotEmpty(getPusherEmail(build));
    }

    private String getPusherEmail(DynamicBuild build) {
        GitHubPushCause cause = build.getCause(GitHubPushCause.class);
        return cause == null ? null : cause.getPusherEmailAddress();
    }
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.