RFR: 273: PR bot should check for empty pull request body

Erik Helin ehelin at openjdk.java.net
Tue Feb 18 08:02:14 UTC 2020


On Mon, 17 Feb 2020 15:59:21 GMT, Robin Westberg <rwestberg at openjdk.org> wrote:

> Hi all,
> 
> Please review this change that makes empty PR bodies fail jcheck, in order to improve the mailing list bridge experience.
> 
> Best regards,
> Robin

Looks good, just two minor comments on the error message!

bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 132:

> 131:         if (bodyWithoutStatus().isBlank()) {
> 132:             var error = "The PR body must not be empty - the content will be used for a notification email.";
> 133:             ret.add(error);

Suggestion:

            var error = "The pull request body must not be empty.";

bots/pr/src/test/java/org/openjdk/skara/bots/pr/CheckTests.java line 691:

> 690:             assertEquals(CheckStatus.FAILURE, check.status());
> 691:             assertTrue(check.summary().orElseThrow().contains("PR body must not be empty"));
> 692: 

Suggestion:

            assertTrue(check.summary().orElseThrow().contains("The pull request body must not be empty."));

-------------



PR: https://git.openjdk.java.net/skara/pull/445


More information about the skara-dev mailing list