aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLimon Monte <limon.monte@gmail.com>2015-06-18 15:58:29 +0200
committerLimon Monte <limon.monte@gmail.com>2015-06-18 15:58:29 +0200
commitc397d42cdbd7358fcff9e67441e5965bb6d15788 (patch)
tree0a199df6f10e899105c330a6bd1c5dc02a7366f0 /src
parente9bb30024131d1b0f9945ee7d4b71e7b48e698b8 (diff)
downloadbbprb-c397d42cdbd7358fcff9e67441e5965bb6d15788.tar.gz
Replace utf symbols in bulid comments with HTML entities.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketRepository.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketRepository.java b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketRepository.java
index c084391..43e4ddd 100644
--- a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketRepository.java
+++ b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketRepository.java
@@ -27,8 +27,8 @@ public class BitbucketRepository {
public static final String BUILD_FINISH_SENTENCE = BUILD_FINISH_MARKER + " \n\n **%s** - %s";
public static final String BUILD_REQUEST_MARKER = "test this please";
- public static final String BUILD_SUCCESS_COMMENT = "✓ SUCCESS";
- public static final String BUILD_FAILURE_COMMENT = "✕ FAILURE";
+ public static final String BUILD_SUCCESS_COMMENT = "&#10004; SUCCESS";
+ public static final String BUILD_FAILURE_COMMENT = "&#10006; FAILURE";
private String projectPath;
private BitbucketPullRequestsBuilder builder;
private BitbucketBuildTrigger trigger;
@@ -113,7 +113,7 @@ public class BitbucketRepository {
}
private boolean isBuildTarget(BitbucketPullRequestResponseValue pullRequest) {
-
+
boolean shouldBuild = true;
if (pullRequest.getState() != null && pullRequest.getState().equals("OPEN")) {
if (isSkipBuild(pullRequest.getTitle())) {
@@ -126,10 +126,10 @@ public class BitbucketRepository {
String owner = destination.getRepository().getOwnerName();
String repositoryName = destination.getRepository().getRepositoryName();
String destinationCommit = destination.getCommit().getHash();
-
+
String id = pullRequest.getId();
List<BitbucketPullRequestComment> comments = client.getPullRequestComments(owner, repositoryName, id);
-
+
if (comments != null) {
Collections.sort(comments);
Collections.reverse(comments);
@@ -162,16 +162,16 @@ public class BitbucketRepository {
//first check source commit -- if it doesn't match, just move on. If it does, investigate further.
if (sourceCommitMatch.equalsIgnoreCase(sourceCommit)) {
// if we're checking destination commits, and if this doesn't match, then move on.
- if (this.trigger.getCheckDestinationCommit()
+ if (this.trigger.getCheckDestinationCommit()
&& (!destinationCommitMatch.equalsIgnoreCase(destinationCommit))) {
continue;
}
-
+
shouldBuild = false;
break;
- }
+ }
}
-
+
if (content.contains(BUILD_REQUEST_MARKER.toLowerCase())) {
shouldBuild = true;
break;