Integrated: 1068: [Backport] Bot finds original commit in wrong repository
erikj at openjdk.java.net
Fri Jul 16 07:06:11 UTC 2021
On Thu, 15 Jul 2021 16:41:35 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
> When the PR bot searches for the original commit for a backport it's more or less random from which repository it will be found. Whatever it finds is posted as a link in a PR comment, and if it points to something weird, that can be confusing (though not strictly incorrect as the change will be the exact same regardless of which repo it is in).
> The search feature already has what looks to be a configurable way to limit searching to a set of organizations. Unfortunately, that feature was never used and is currently broken for Github (for Gitlab it's already in use as it's required for the search method we use). Because of this, we usually pick a match from adoptium or SAP today. This patch fixes this for Github (where the query separator is space, not '+'), and I intend to limit the organizations to "openjdk" when deploying this fix.
> In addition to this, it would be nice if the exact repo that gets picked is the "correct" one. Unfortunately, there is no really good definition of what the correct repo would be in all cases, and it would be even trickier to implement this in a good way. As an approximate workaround, I've added sorting on repository name length, so we always pick the repo with the shortest name. I believe this will at least give us a better answer than "random" in most cases for a relatively modest cost in performance.
> I have experimented with this patch in staging with the playground repo and the behavior I've seen so far is good.
This pull request has now been integrated.
Author: Erik Joelsson <erikj at openjdk.org>
Stats: 15 lines in 2 files changed: 10 ins; 0 del; 5 mod
1068: [Backport] Bot finds original commit in wrong repository
More information about the skara-dev