aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketCause.java
diff options
context:
space:
mode:
authorBlayne Chard <blacha@aviarc.com>2014-05-13 16:37:58 +1200
committerBlayne Chard <blacha@aviarc.com>2014-05-14 17:10:56 +1200
commitbe3e57315173936cd23c135b6c9eb86e73d1700e (patch)
tree6a306ae1904a80d0a7d33b845d57d2b42b28b833 /src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketCause.java
parent68bf998f6ebf61dcd5b2d9aad765369aeabf714f (diff)
downloadbbprb-be3e57315173936cd23c135b6c9eb86e73d1700e.tar.gz
adding bitbucket pull request hash into BuildStart and BuildFinish messages, so when a pull request is updated a new build will be made.
Diffstat (limited to 'src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketCause.java')
-rw-r--r--src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketCause.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketCause.java b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketCause.java
index 1cb5da4..66a0ad8 100644
--- a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketCause.java
+++ b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketCause.java
@@ -14,6 +14,7 @@ public class BitbucketCause extends Cause {
private final String destinationRepositoryOwner;
private final String destinationRepositoryName;
private final String pullRequestTitle;
+ private final String commitHash;
public static final String BITBUCKET_URL = "https://bitbucket.org/";
public BitbucketCause(String sourceBranch,
@@ -23,7 +24,8 @@ public class BitbucketCause extends Cause {
String pullRequestId,
String destinationRepositoryOwner,
String destinationRepositoryName,
- String pullRequestTitle) {
+ String pullRequestTitle,
+ String commitHash) {
this.sourceBranch = sourceBranch;
this.targetBranch = targetBranch;
this.repositoryOwner = repositoryOwner;
@@ -32,6 +34,7 @@ public class BitbucketCause extends Cause {
this.destinationRepositoryOwner = destinationRepositoryOwner;
this.destinationRepositoryName = destinationRepositoryName;
this.pullRequestTitle = pullRequestTitle;
+ this.commitHash = commitHash;
}
public String getSourceBranch() {
@@ -66,6 +69,8 @@ public class BitbucketCause extends Cause {
return pullRequestTitle;
}
+ public String getCommitHash() { return commitHash; }
+
@Override
public String getShortDescription() {
String description = "<a href=" + BITBUCKET_URL + this.getDestinationRepositoryOwner() + "/";