Skip to content

Add an option to report content of NEW jobs - #872

Open
pabs3 wants to merge 1 commit into
thp:masterfrom
pabs3:report-new-content
Open

pabs3 wants to merge 1 commit into
thp:masterfrom
pabs3:report-new-content

Conversation

@pabs3

@pabs3 pabs3 commented Aug 31, 2026

Copy link
Copy Markdown

This is slightly nicer than the treat_new_as_changed job option,
since it correctly displays the job state as NEW instead of CHANGED,
and the content is displayed without the extraneous diff syntax.

This is slightly nicer than the treat_new_as_changed job option,
since it correctly displays the job state as NEW instead of CHANGED,
and the content is displayed without the extraneous diff syntax.
Comment thread docs/source/jobs.rst
- ``diff_tool``: Command to a custom tool for generating diff text
- ``diff_filter``: :doc:`filters` (if any) to apply to the diff result (can be tested with ``--test-diff-filter``)
- ``treat_new_as_changed``: Will treat jobs that don't have any historic data as ``CHANGED`` instead of ``NEW`` (and create a diff for new jobs)
- ``treat_new_as_changed``: Will treat jobs that don't have any historic data as ``CHANGED`` instead of ``NEW`` (and create a diff for new jobs) (use the ``new`` reporter option to get content instead)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just deprecate the old option? And/or change behavior of the old option (keeping it in for backwards compatibility, but warning) and maybe renaming it report_new or something?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some folks might have setup scripts parsing the old output (I don't), so I wouldn't change the behaviour of the treat_new_as_changed option, but I'm fine with deprecation and later removal of the old option.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its also possible that some folks want to only have to handle CHANGED status and diff output, rather than having to also handle NEW. That doesn't apply to my situation, but I can understand if some folks do want it.

@thp thp left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, I like the idea, but not sure about the new naming ("new" is such an overloaded term, maybe report_new or show_new or even just initial / report_initial? Or even report_first (since it's really about "having a history or not" rather than being "new" as such)

@pabs3

pabs3 commented Sep 8, 2026 •

Copy link
Copy Markdown
Author

not sure about the new naming

Fine to change the naming to your preferred one, all the options you proposed work for me, but I think I prefer show_new (or report_new) because it matches the NEW status urlwatch uses, so folks would think of it first, but we can also add "initial" and "first" in the wording in the documentation for easier searchability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants