RFR: 401: Allow a PR author to manually add reviewers
    Robin Westberg 
    rwestberg at openjdk.java.net
       
    Thu May 28 06:49:50 UTC 2020
    
    
  
On Wed, 27 May 2020 13:05:19 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> Hi all,
>> 
>> Please review this change that adds a `/reviewer` command that allows the PR author to manually add reviewers. The
>> implementation is fairly similar to the `/contributor` command.
>> Best regards,
>> Robin
>
> bots/pr/src/main/java/org/openjdk/skara/bots/pr/ReviewerCommand.java line 76:
> 
>> 75:         if (bot.ignoreStaleReviews()) {
>> 76:             reply.println("This project requires authenticated reviews - please ask your reviewer to flag this PR
>> as reviewed."); 77:             return;
> 
> Maybe this should contain an `@<pr-author>` as well? (both to notify and make it clear who is being addressed).
Yep, but all command replies are automatically prepended with `@comment-author` - and since the check above this one
ensures that the comment author is the pr-author the message should only happen as a reply to the author of the pr.
> bots/pr/src/main/java/org/openjdk/skara/bots/pr/ReviewerCommand.java line 98:
> 
>> 97:                                        .filter(Objects::nonNull)
>> 98:                                        .collect(Collectors.toSet());
>> 99:
> 
> I see this stream pipeline duplicated a few times already (in CheckablePullRequest and CheckRun). Maybe you want to
> move this to a helper method somewhere?
Good point, I'll move it to somewhere common.
-------------
PR: https://git.openjdk.java.net/skara/pull/630
    
    
More information about the skara-dev
mailing list