RFR: 1515: Mailing list parsing of PR links broken since openjdk.org transition

Kevin Rushforth kcr at openjdk.org
Fri Aug 5 13:17:28 UTC 2022


On Mon, 1 Aug 2022 22:52:29 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> The mlbridge bot uses PR links in emails to identify which PR an email thread belongs to. This is then used to correctly post emails from the archive as comments on PRs. The PR links in the emails are transformed to an openjdk style URL:
> 
> github.com/openjdk -> git.openjdk.org
> 
> The URL matching logic knows about this transformation and tries to reverse it before matching PR links. The problem is that before June 9, the rewritten URLs were git.openjdk.java.net. The current logic can't handle multiple different transformation patterns, so any emails found with the old URL can't be matched correctly to PRs.
> 
> In the github host config for the mlbridge bot, we currently have this config:
> 
> 
>         "weburl": {
>           "pattern": "^https://github.com/openjdk/(.*)$",
>           "replacement": "https://git.openjdk.org/$1",
>         }
> 
> This patch adds the ability to add alternate replacement patterns. By using this, we can search for both the old openjdk.java.net URLs as well as the new openjdk.org one. It will look like this:
> 
> 
>         "weburl": {
>           "pattern": "^https://github.com/openjdk/(.*)$",
>           "replacement": "https://git.openjdk.org/$1",
>           "altreplacements": [
>             "https://git.openjdk.java.net/$1",
>           ],
>         }

Looks good.

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

Marked as reviewed by kcr (Reviewer).

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


More information about the skara-dev mailing list