RFR: 1856: Include a link to the webrev comment in the pull request's description
Zhao Song
zsong at openjdk.org
Thu Mar 30 19:15:35 UTC 2023
On Thu, 30 Mar 2023 18:40:15 GMT, Erik Joelsson <erikj 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/CheckRun.java line 735:
>
>> 733: private String getWebrevCommentLink() {
>> 734: var webrevComment = comments.stream()
>> 735: .filter(comment -> comment.author().username().equals("mlbridge[bot]"))
>
> We can't hard code the bot name here, it needs to be a configuration parameter for pr bot. See configuration of mlbridge for an example of how we configure user names to filter comments.
Will fix it.
> bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 739:
>
>> 737: .findFirst();
>> 738: return webrevComment.map(comment -> "[Link to Webrev Comment](" + pr.commentUrl(comment).toString() + ")")
>> 739: .orElse("Webrev comment has not been available now.");
>
> I think this method could return an Optional and that we should only print the whole section if a webrev comment has been posted.
Sure, will fix it.
-------------
PR Review Comment: https://git.openjdk.org/skara/pull/1494#discussion_r1153675999
PR Review Comment: https://git.openjdk.org/skara/pull/1494#discussion_r1153676346
More information about the skara-dev
mailing list