Search in sources :

Example 1 with GitHubComponent

use of org.apache.camel.component.github.GitHubComponent in project camel by apache.

the class GitHubComponentAutoConfiguration method configureGitHubComponent.

@Lazy
@Bean(name = "github-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(GitHubComponent.class)
public GitHubComponent configureGitHubComponent(CamelContext camelContext) throws Exception {
    GitHubComponent component = new GitHubComponent();
    component.setCamelContext(camelContext);
    return component;
}
Also used : GitHubComponent(org.apache.camel.component.github.GitHubComponent) Lazy(org.springframework.context.annotation.Lazy) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnClass(org.springframework.boot.autoconfigure.condition.ConditionalOnClass) ConditionalOnBean(org.springframework.boot.autoconfigure.condition.ConditionalOnBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 2 with GitHubComponent

use of org.apache.camel.component.github.GitHubComponent in project camel by apache.

the class PullRequestStateProducerTest method createRouteBuilder.

@Override
protected RouteBuilder createRouteBuilder() throws Exception {
    return new RouteBuilder() {

        @Override
        public void configure() throws Exception {
            context.addComponent("github", new GitHubComponent());
            from("direct:validPullRequest").process(new MockPullRequestStateProducerProcessor()).to("github://pullRequestState?state=success&username=someguy&password=apassword&repoOwner=anotherguy&repoName=somerepo");
        }
    };
}
Also used : GitHubComponent(org.apache.camel.component.github.GitHubComponent) RouteBuilder(org.apache.camel.builder.RouteBuilder)

Example 3 with GitHubComponent

use of org.apache.camel.component.github.GitHubComponent in project camel by apache.

the class ClosePullRequestProducerTest method createRouteBuilder.

@Override
protected RouteBuilder createRouteBuilder() throws Exception {
    return new RouteBuilder() {

        @Override
        public void configure() throws Exception {
            context.addComponent("github", new GitHubComponent());
            from(PULL_REQUEST_PRODUCER_ENDPOINT).process(new ClosePullRequestProducerProcessor()).to("github://closePullRequest?username=someguy&password=apassword&repoOwner=anotherguy&repoName=somerepo");
        }
    };
}
Also used : GitHubComponent(org.apache.camel.component.github.GitHubComponent) RouteBuilder(org.apache.camel.builder.RouteBuilder)

Example 4 with GitHubComponent

use of org.apache.camel.component.github.GitHubComponent in project camel by apache.

the class CreateIssueProducerTest method createRouteBuilder.

@Override
protected RouteBuilder createRouteBuilder() throws Exception {
    return new RouteBuilder() {

        @Override
        public void configure() throws Exception {
            context.addComponent("github", new GitHubComponent());
            from("direct:createIssue").process(new MockIssueCreateProducerProcessor()).to("github://createissue?state=success&username=someguy&password=apassword&repoOwner=anotherguy&repoName=somerepo");
        }
    };
}
Also used : GitHubComponent(org.apache.camel.component.github.GitHubComponent) RouteBuilder(org.apache.camel.builder.RouteBuilder)

Example 5 with GitHubComponent

use of org.apache.camel.component.github.GitHubComponent in project camel by apache.

the class PullRequestCommentProducerTest method createRouteBuilder.

@Override
protected RouteBuilder createRouteBuilder() throws Exception {
    return new RouteBuilder() {

        @Override
        public void configure() throws Exception {
            context.addComponent("github", new GitHubComponent());
            from("direct:validPullRequest").process(new MockPullRequestCommentProducerProcessor()).to("github://pullRequestComment?username=someguy&password=apassword&repoOwner=anotherguy&repoName=somerepo");
        }
    };
}
Also used : GitHubComponent(org.apache.camel.component.github.GitHubComponent) RouteBuilder(org.apache.camel.builder.RouteBuilder)

Aggregations

GitHubComponent (org.apache.camel.component.github.GitHubComponent)10 RouteBuilder (org.apache.camel.builder.RouteBuilder)9 ConditionalOnBean (org.springframework.boot.autoconfigure.condition.ConditionalOnBean)1 ConditionalOnClass (org.springframework.boot.autoconfigure.condition.ConditionalOnClass)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 Bean (org.springframework.context.annotation.Bean)1 Lazy (org.springframework.context.annotation.Lazy)1