RFR: 394: Merge bot conflict resolution interaction requires separate credentials
Robin Westberg
rwestberg at openjdk.java.net
Mon May 11 07:17:36 UTC 2020
On Fri, 8 May 2020 16:02:23 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> Hi all,
>>
>> Please review this change that allows the pull request bot to recognize specially formatted command comments made by
>> "itself" (most likely another bot using the same credentials).
>> Best regards,
>> Robin
>
> bots/pr/src/test/java/org/openjdk/skara/bots/pr/CommandTests.java line 137:
>
>> 136: TestBotRunner.runPeriodicItems(mergeBot);
>> 137: assertEquals(1, pr.comments().size());
>> 138:
>
> Should to `runPeriodicItems` call right after adding the "/help" comment be there? Asking because it looks like you
> want to check the number of comments before and after running the bot below that (but at that point the bot has already
> run).
Right, I put the asserts around the bot execution to make it clear that the number doesn't change, but the first
invocation certainly obfuscates that.. Will remove it.
> bots/pr/src/test/java/org/openjdk/skara/bots/pr/CommandTests.java line 149:
>
>> 148: .filter(comment -> comment.body().contains("help"))
>> 149: .count();
>> 150: assertEquals(1, help);
>
> Spurious whitespace on last line
> Suggestion:
>
> var help = pr.comments().stream()
> .filter(comment -> comment.body().contains("Available commands"))
> .filter(comment -> comment.body().contains("help"))
> .count();
Will fix.
-------------
PR: https://git.openjdk.java.net/skara/pull/618
More information about the skara-dev
mailing list