diff --git a/CHANGELOG.md b/CHANGELOG.md index e87e0406..562b96de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format mostly follows [Keep a Changelog](http://keepachangelog.com/en/1.0.0/ ### Fixed - Fix documentation for watching Github tags and releases, again (#723) +- Fix `--test-reporter` command-line option so `separate` configuration option is no longer ignored when sending test notifications (#772, by marunjar) ## [2.28] -- 2023-05-03 diff --git a/lib/urlwatch/reporters.py b/lib/urlwatch/reporters.py index f2bf5dfb..26e7b78a 100644 --- a/lib/urlwatch/reporters.py +++ b/lib/urlwatch/reporters.py @@ -126,7 +126,12 @@ def submit_one(cls, name, report, job_states, duration): subclass = cls.__subclasses__[name] cfg = report.config['report'].get(name, {'enabled': False}) if cfg['enabled']: - subclass(report, cfg, job_states, duration).submit() + base_config = subclass.get_base_config(report) + if base_config.get('separate', False): + for job_state in job_states: + subclass(report, cfg, [job_state], duration).submit() + else: + subclass(report, cfg, job_states, duration).submit() else: raise ValueError('Reporter not enabled: {name}'.format(name=name))