diff options
3 files changed, 3 insertions, 2 deletions
@@ -8,7 +8,7 @@ <artifactId>bitbucket-pullrequest-builder</artifactId> <name>Bitbucket Pullrequest Builder Plugin</name> - <version>1.4.26-SNAPSHOT</version> + <version>1.4.26-SNAPSHOT-sazo</version> <description>This Jenkins plugin builds pull requests from Bitbucket.org and will report the test results.</description> <packaging>hpi</packaging> <url>https://wiki.jenkins-ci.org/display/JENKINS/Bitbucket+pullrequest+builder+plugin</url> diff --git a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuilds.java b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuilds.java index 216287d..6ba3dab 100644 --- a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuilds.java +++ b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuilds.java @@ -19,6 +19,7 @@ public class BitbucketBuilds { public BitbucketBuilds(BitbucketBuildTrigger trigger, BitbucketRepository repository) { this.trigger = trigger; this.repository = repository; + this.repository.init(); } void onStarted(BitbucketCause cause, Run<?, ?> build) { diff --git a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketPullRequestsBuilder.java b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketPullRequestsBuilder.java index 4474581..086cf01 100644 --- a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketPullRequestsBuilder.java +++ b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketPullRequestsBuilder.java @@ -33,7 +33,6 @@ public class BitbucketPullRequestsBuilder { public void run() { logger.fine("Build Start."); - this.repository.init(); Collection<Pullrequest> targetPullRequests = this.repository.getTargetPullRequests(); this.repository.addFutureBuildTasks(targetPullRequests); } @@ -43,6 +42,7 @@ public class BitbucketPullRequestsBuilder { throw new IllegalStateException(); } this.repository = new BitbucketRepository(this.trigger.getProjectPath(), this); + this.repository.init(); this.builds = new BitbucketBuilds(this.trigger, this.repository); return this; } |