From c397d42cdbd7358fcff9e67441e5965bb6d15788 Mon Sep 17 00:00:00 2001 From: Limon Monte Date: Thu, 18 Jun 2015 15:58:29 +0200 Subject: Replace utf symbols in bulid comments with HTML entities. --- .../BitbucketRepository.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src') 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 = "✔ SUCCESS"; + public static final String BUILD_FAILURE_COMMENT = "✖ 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 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; -- cgit v1.2.3