RFR: 1856: Include a link to the webrev comment in the pull request's description

Erik Joelsson erikj at openjdk.org
Thu Mar 30 18:48:39 UTC 2023

On Wed, 29 Mar 2023 22:00:31 GMT, Zhao Song <zsong at openjdk.org> wrote:

>> Some users complained about that GitHub often hide the webrev comment and it's hard for them to find webrev comment among hundreds of comments. 
>> In this patch, the pr bot would add the link to webrev comment to the pr body.
>> Originally, the comments from mlbridge bot would not trigger the update of the pr, now, when mlbridge bot **first** post the webrev comment, it will trigger the update of the pr.
> bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckWorkItem.java line 100:
>> 98:                                         .collect(Collectors.joining());
>> 99:             commentString = commentString + comments.stream()
>> 100:                     .filter(comment -> comment.author().username().equals("mlbridge[bot]"))
> We also could compare `comment.author().id()` here, but I am not sure if it is a good idea to explicitly expose the id of mlbridge bot.

The `commentString` looks like it's only containing comments from the currentUser (which is the bot user for the pr bot). I think we need to filter all comments again for the mlbridge user to find this comment.


PR Review Comment: https://git.openjdk.org/skara/pull/1494#discussion_r1153654764

More information about the skara-dev mailing list