From 75624f5944dc066005b003f6d77b415aaac9ab31 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Tue, 10 Nov 2020 11:46:30 -0500 Subject: [PATCH] Automation Rules: allow to invert a match Ref https://github.com/readthedocs/readthedocs.org/pull/7653 Closes https://github.com/readthedocs/readthedocs.org/issues/6354 --- docs/automation-rules.rst | 12 ++++++--- readthedocs/builds/forms.py | 7 +++++ readthedocs/builds/managers.py | 6 ++--- .../migrations/0028_add_on_match_field.py | 18 +++++++++++++ readthedocs/builds/models.py | 10 ++++++- .../rtd_tests/tests/test_automation_rules.py | 26 +++++++++++++++++++ 6 files changed, 70 insertions(+), 9 deletions(-) create mode 100644 readthedocs/builds/migrations/0028_add_on_match_field.py diff --git a/docs/automation-rules.rst b/docs/automation-rules.rst index e50b23293c9..eda692d3741 100644 --- a/docs/automation-rules.rst +++ b/docs/automation-rules.rst @@ -82,6 +82,12 @@ You can change the order using the up and down arrow buttons. New rules are added at the end (lower priority). +Perform action on match +----------------------- + +If this attribute is un-check, the rule will be inverted. +This means the action will be performed over versions that don't match the pattern. + Examples -------- @@ -127,9 +133,7 @@ Activate all new tags and branches that start with ``v`` or ``V`` Activate all new tags that don't contain the ``-nightly`` suffix ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. TODO: update example if https://github.com/readthedocs/readthedocs.org/issues/6354 is approved. - - -- Custom match: ``.*(?