aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger.java b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger.java
index 373c228..846ecb5 100644
--- a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger.java
+++ b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketBuildTrigger.java
@@ -253,9 +253,13 @@ public class BitbucketBuildTrigger extends Trigger<Job<?, ?>> {
@Override
public void run() {
- logger.log(Level.INFO, "TODO: check if project is disabled before calling bitbucketPullRequestsBuilder.run()");
- this.bitbucketPullRequestsBuilder.run();
- this.getDescriptor().save();
+ Job<?,?> project = this.getBuilder().getProject();
+ if (project instanceof AbstractProject && ((AbstractProject)project).isDisabled()) {
+ logger.info("Build Skip.");
+ } else {
+ this.bitbucketPullRequestsBuilder.run();
+ this.getDescriptor().save();
+ }
}
@Override