diff --git a/bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java b/bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java index 0e491d6d3..7a15c1364 100644 --- a/bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java +++ b/bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java @@ -702,12 +702,13 @@ private void addMergeCommitWarningComment(List comments) { return; } - var message = "@" + pr.author().userName() + " This pull request looks like it contains a merge commit that " + - "brings in commits from outside of this repository. If you want these commits to be preserved " + - "when you integrate, you will need to make a 'merge-style' pull request. To do this, change the " + - "title of this pull request to `Merge :`, where `` is the name of another " + - "project in the OpenJDK organization. For example: `Merge jdk:master`." + - "\n" + mergeCommitWarningMarker; + var message = "⚠️ @" + pr.author().userName() + + " This pull request contains merges that bring in commits not present in the target repository." + + " Since this is not a \"merge style\" pull request, these changes will be squashed when this pull request in integrated." + + " If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change" + + " the title of this pull request to `Merge :` where `` is the name of another project in the" + + " [OpenJDK organization](https://github.com/openjdk) (for example `Merge jdk:master`).\n" + + mergeCommitWarningMarker; pr.addComment(message); } diff --git a/bots/pr/src/test/java/org/openjdk/skara/bots/pr/MergeTests.java b/bots/pr/src/test/java/org/openjdk/skara/bots/pr/MergeTests.java index 10dd9c9b7..912afd3f8 100644 --- a/bots/pr/src/test/java/org/openjdk/skara/bots/pr/MergeTests.java +++ b/bots/pr/src/test/java/org/openjdk/skara/bots/pr/MergeTests.java @@ -1064,7 +1064,7 @@ void foreignCommitWarning(TestInfo testInfo) throws IOException { TestBotRunner.runPeriodicItems(mergeBot); // There should be a warning - assertLastCommentContains(pr, "This pull request looks like it contains a merge commit"); + assertLastCommentContains(pr, "This pull request contains merges that brings in commits not present"); } } }