Integrated: 1515: Mailing list parsing of PR links broken since openjdk.org transition
Erik Joelsson
erikj at openjdk.org
Fri Aug 5 13:27:44 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",
> ],
> }
This pull request has now been integrated.
Changeset: da062e7b
Author: Erik Joelsson <erikj at openjdk.org>
URL: https://git.openjdk.org/skara/commit/da062e7bd6f7716e66135c0248cb2dab7cfd4651
Stats: 90 lines in 5 files changed: 57 ins; 3 del; 30 mod
1515: Mailing list parsing of PR links broken since openjdk.org transition
Reviewed-by: kcr
-------------
PR: https://git.openjdk.org/skara/pull/1346
More information about the skara-dev
mailing list