From 81b2c9e94ec7e15546dc5f56ac1e9adbe9059abd Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jul 25 2018 09:44:46 +0000 Subject: [PATCH 1/2] Fix docstring Signed-off-by: Pierre-Yves Chibon --- diff --git a/tests/test_pagure_lib_notify.py b/tests/test_pagure_lib_notify.py index 79603c2..12242f0 100644 --- a/tests/test_pagure_lib_notify.py +++ b/tests/test_pagure_lib_notify.py @@ -419,7 +419,7 @@ class PagureLibNotifytests(tests.Modeltests): {'EVENTSOURCE_SOURCE': 'localhost.localdomain'}) @patch('pagure.lib.notify.smtplib.SMTP') def test_send_email(self, mock_smtp): - """ Test the notify_new_comment method from pagure.lib.notify. """ + """ Test the send_email method from pagure.lib.notify. """ mock_smtp.return_value = MagicMock() email = pagure.lib.notify.send_email( From 238fc8fa4cf18fe05bf3d3ea1b85dd1e682a5e36 Mon Sep 17 00:00:00 2001 From: Alois Mahdal Date: Jul 25 2018 14:44:44 +0000 Subject: [PATCH 2/2] Allow colon inside tag name One example where colons are useful is when implementing debtags-like tags (Faceted Classification). For example: isa::bug isa::rfe severity::high severity::low The double colon here makes it easier to recognize the fact that Faceted Classification is being used. Related to https://pagure.io/pagure/issue/3406 --- diff --git a/pagure/forms.py b/pagure/forms.py index 58281db..208bd29 100644 --- a/pagure/forms.py +++ b/pagure/forms.py @@ -33,7 +33,7 @@ from pagure.utils import urlpattern STRICT_REGEX = '^[a-zA-Z0-9-_]+$' -TAGS_REGEX = '^[a-zA-Z0-9-_, .]+$' +TAGS_REGEX = '^[a-zA-Z0-9-_, .:]+$' FALSE_VALUES = ('false', '', False, 'False', 0, '0') WTF_VERSION = tuple()