RFR: 1843: mlbridge bot bridge emails generated by itself.

Erik Joelsson erikj at openjdk.org
Thu Mar 16 18:37:29 UTC 2023


On Thu, 16 Mar 2023 15:48:33 GMT, Zhao Song <zsong at openjdk.org> wrote:

>> bots/mlbridge/src/main/java/org/openjdk/skara/bots/mlbridge/MailingListArchiveReaderBot.java line 118:
>> 
>>> 116:         }
>>> 117:         var bridgeIdStr = "^[^.]+\\.[^.]+@(?:" + pr.repository().url().getHost() + "|" + pr.repository().authenticatedUrl().getHost() + ")$";
>>> 118:         var bridgeIdPattern = Pattern.compile(bridgeIdStr);
>> 
>> I think the correct fix is to just get the host from `authenticatedUrl`. Perhaps there should be a different method for this kind of usecase that better describes what we need here (the raw actual host, without the pattern rewrite), but at least for now, I think changing this to `authenticatedUrl` is a good enough fix. Thanks for figuring this out.
>
> Just a reminder, If so, we should also change `return EmailAddress.from(encodedCommon + "." + UUID.randomUUID() + "@" + pr.repository().url().getHost())` in `ReviewArchive::getUniqueMessageId ` to `return EmailAddress.from(encodedCommon + "." + UUID.randomUUID() + "@" + pr.repository().authenticatedUrl().getHost())`

Yes, right, we are currently generating `Message-ID`s with the rewritten url. That's bad. We should make sure they are all reverted to github.com.

-------------

PR Review Comment: https://git.openjdk.org/skara/pull/1485#discussion_r1139213720


More information about the skara-dev mailing list