aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuilds.java1
-rw-r--r--src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketPullRequestsBuilder.java2
2 files changed, 2 insertions, 1 deletions
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;
}