From 71b83428ebd8cd6ebfce3416da0a744984a462a9 Mon Sep 17 00:00:00 2001 From: Allen Cook Date: Wed, 18 Dec 2019 07:08:21 -0500 Subject: [PATCH 1/2] Fix ref/pull/###/merge at same position as source Had an issue where the head of the merge request was at the same location as the source so the status was posted to the previous iteration. --- .../buildServer/commitPublisher/tfs/TfsStatusPublisher.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commit-status-publisher-server/src/main/java/jetbrains/buildServer/commitPublisher/tfs/TfsStatusPublisher.java b/commit-status-publisher-server/src/main/java/jetbrains/buildServer/commitPublisher/tfs/TfsStatusPublisher.java index 1bdf659d..1586df6f 100644 --- a/commit-status-publisher-server/src/main/java/jetbrains/buildServer/commitPublisher/tfs/TfsStatusPublisher.java +++ b/commit-status-publisher-server/src/main/java/jetbrains/buildServer/commitPublisher/tfs/TfsStatusPublisher.java @@ -209,7 +209,9 @@ public void processResponse(HttpHelper.HttpResponse response) throws HttpPublish LOG.debug(message, e); throw new PublisherException(message, e); } - + + commits.add(parentCommitId); //include the merge commit in-case the head of the merge branch is the same as source + return commits; } From ee77b0927c5dae1de95628d12ce966313231e58c Mon Sep 17 00:00:00 2001 From: Allen Cook Date: Mon, 23 Dec 2019 09:38:02 -0500 Subject: [PATCH 2/2] Update comment to reflect reality --- .../buildServer/commitPublisher/tfs/TfsStatusPublisher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commit-status-publisher-server/src/main/java/jetbrains/buildServer/commitPublisher/tfs/TfsStatusPublisher.java b/commit-status-publisher-server/src/main/java/jetbrains/buildServer/commitPublisher/tfs/TfsStatusPublisher.java index 1586df6f..86193009 100644 --- a/commit-status-publisher-server/src/main/java/jetbrains/buildServer/commitPublisher/tfs/TfsStatusPublisher.java +++ b/commit-status-publisher-server/src/main/java/jetbrains/buildServer/commitPublisher/tfs/TfsStatusPublisher.java @@ -210,7 +210,7 @@ public void processResponse(HttpHelper.HttpResponse response) throws HttpPublish throw new PublisherException(message, e); } - commits.add(parentCommitId); //include the merge commit in-case the head of the merge branch is the same as source + commits.add(parentCommitId); //include the current revision in search return commits; }