RFR: 1344: Support notifications operating on a repository mirror

Kevin Rushforth kcr at openjdk.java.net
Tue Feb 15 13:02:17 UTC 2022


On Mon, 14 Feb 2022 22:43:45 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> We would like to move some NotifierBot configurations to operate off of a mirror of a repo instead of the original repo. In order to support this I would like to add these two new configuration options in the issue notifier:
> 
> 1. "originalrepository": Setting this implies that the repo the notifier is operating on is a mirror, and this original repo should be used for any links generated in notifications.
> 2. "repoonly": Similar to the existing "pronly", this limits what kind of notifications the notifier acts on. This is needed to be able to separate the PR event based notifications from the repo event based notifications. PRs aren't mirrored so those can't be moved to operate from the mirror.
> 
> When implementing repoonly, I also changed the NotifyBot to only return WorkItems for either pr or repo if there are actually listeners registered for them respectively. This caused some seemingly unrelated tests to fail, as they were relying on the side effect of running the RepositoryWorkItem with nothing to do. To combat this, I've introduced a mock NullRepositoryListener for these tests.

Marked as reviewed by kcr (Reviewer).

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

PR: https://git.openjdk.java.net/skara/pull/1285


More information about the skara-dev mailing list