aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketCause.java
diff options
context:
space:
mode:
authorMaxim Epishchev <epishev@garant.ru>2016-04-19 16:58:43 +0300
committerMaxim Epishchev <epishev@garant.ru>2016-04-20 13:54:29 +0300
commitade4a1a1e2fdfac7180cadebd574ffe5bdedd062 (patch)
tree573567f237cd68e1f36e2f9d51412c17fe833281 /src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketCause.java
parentf08fe64257973cddea7ca3ae837f5cfe3db7b720 (diff)
downloadbbprb-ade4a1a1e2fdfac7180cadebd574ffe5bdedd062.tar.gz
Available "pullRequestAuthor" env variable (featured from #83)
Env variable "pullRequestAuthor" contain two parts of author: full name of user and short username in format, like: "Some Doo <@somedoo>". Add test for PR build filter: now we can filter also by author: "a:maxvodo" by example.
Diffstat (limited to 'src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketCause.java')
-rw-r--r--src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketCause.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketCause.java b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketCause.java
index e233371..3cb107b 100644
--- a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketCause.java
+++ b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketCause.java
@@ -16,6 +16,7 @@ public class BitbucketCause extends Cause {
private final String pullRequestTitle;
private final String sourceCommitHash;
private final String destinationCommitHash;
+ private final String pullRequestAuthor;
public static final String BITBUCKET_URL = "https://bitbucket.org/";
public BitbucketCause(String sourceBranch,
@@ -27,7 +28,8 @@ public class BitbucketCause extends Cause {
String destinationRepositoryName,
String pullRequestTitle,
String sourceCommitHash,
- String destinationCommitHash) {
+ String destinationCommitHash,
+ String pullRequestAuthor) {
this.sourceBranch = sourceBranch;
this.targetBranch = targetBranch;
this.repositoryOwner = repositoryOwner;
@@ -38,6 +40,7 @@ public class BitbucketCause extends Cause {
this.pullRequestTitle = pullRequestTitle;
this.sourceCommitHash = sourceCommitHash;
this.destinationCommitHash = destinationCommitHash;
+ this.pullRequestAuthor = pullRequestAuthor;
}
public String getSourceBranch() {
@@ -83,4 +86,8 @@ public class BitbucketCause extends Cause {
description += "\">#" + this.getPullRequestId() + " " + this.getPullRequestTitle() + "</a>";
return description;
}
+
+ public String getPullRequestAuthor() {
+ return this.pullRequestAuthor;
+ }
}