Skip to content

Commit

Permalink
1843: mlbridge bot bridges emails generated by itself
Browse files Browse the repository at this point in the history
Reviewed-by: erikj
  • Loading branch information
lgxbslgx committed Mar 17, 2023
1 parent bead107 commit 0853677
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -114,7 +114,7 @@ synchronized void inspect(Conversation conversation) {
pr = foundPr.get();
resolvedPullRequests.put(first.id(), pr);
}
var bridgeIdPattern = Pattern.compile("^[^.]+\\.[^.]+@" + pr.repository().url().getHost() + "$");
var bridgeIdPattern = Pattern.compile("^[^.]+\\.[^.]+@" + pr.repository().authenticatedUrl().getHost() + "$");

// Filter out already bridged comments
var bridgeCandidates = newMessages.stream()
Expand Down
Expand Up @@ -296,7 +296,7 @@ private EmailAddress getUniqueMessageId(String identifier) {
digest.update(identifier.getBytes(StandardCharsets.UTF_8));
var encodedCommon = Base64.getUrlEncoder().encodeToString(digest.digest());

return EmailAddress.from(encodedCommon + "." + UUID.randomUUID() + "@" + pr.repository().url().getHost());
return EmailAddress.from(encodedCommon + "." + UUID.randomUUID() + "@" + pr.repository().authenticatedUrl().getHost());
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException("Cannot find SHA-256");
}
Expand Down

1 comment on commit 0853677

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.