Skip to content

Commit

Permalink
Merge pull request #772 from marunjar/fix_test_reporter_separated
Browse files Browse the repository at this point in the history
reporters: test report jobs separately
  • Loading branch information
thp authored Oct 25, 2023
2 parents f1fd10d + 7788322 commit 74671c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,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

Expand Down
7 changes: 6 additions & 1 deletion lib/urlwatch/reporters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 74671c3

Please sign in to comment.