RFR: 1344: Support notifications operating on a repository mirror

Erik Joelsson erikj at openjdk.java.net
Mon Feb 14 22:47:55 UTC 2022

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.


Commit messages:
 - Merge branch 'master' into SKARA-1344-notify-on-mirror
 - Add new test and fix some existing ones
 - Implementation

Changes: https://git.openjdk.java.net/skara/pull/1285/files
 Webrev: https://webrevs.openjdk.java.net/?repo=skara&pr=1285&range=00
  Issue: https://bugs.openjdk.java.net/browse/SKARA-1344
  Stats: 156 lines in 7 files changed: 128 ins; 5 del; 23 mod
  Patch: https://git.openjdk.java.net/skara/pull/1285.diff
  Fetch: git fetch https://git.openjdk.java.net/skara pull/1285/head:pull/1285

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

More information about the skara-dev mailing list