RFR: 1823: Mailing list bot should include link to comment on the Git forge

Erik Joelsson erikj at openjdk.org
Fri Feb 17 21:00:25 UTC 2023

On Fri, 17 Feb 2023 18:56:58 GMT, Zhao Song <zsong at openjdk.org> wrote:

> This patch will add the ability to attach comment/reviewComment/review link to the email generated by mlbridge bot
> The implementation for GitHub is straightforward, we can extract the URL for a specific comment or review from the JSON response using the `html_url` field and include it in the email. 
> For GitLab, we will need to generate the URL using the `id` field in `note,` since GitLab does not provide an field like `html_url` in its JSON responses.

When publishing URLs in emails, we rewrite them to be (somewhat) forge agnostic. If you look in any PR email, you will not that it says "git.openjdk.org" and not github.com. This is a service we host that redirects to "github.com/openjdk". If we were to ever move to a different provider, we can change that rewrite service. Because of this, we can't use the URLs in the PR object for emails. We need to generate them.

Since we don't need these URLs every time we fetch comments or reviews, I think it would make sense to let the PullRequest handle generation of these URLs, something like `PullRequest.reviewUrl(Review)` and `PullRequest.commentUrl(Comment)`, similar to the existing `PullRequest.changeUrl`.


PR: https://git.openjdk.org/skara/pull/1478

More information about the skara-dev mailing list