diff --git a/doc/configuration.rst b/doc/configuration.rst index 8abc172..7b5d050 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -734,6 +734,15 @@ Defaults to: ``False``. This does not disable emails to the email address set in ``EMAIL_ERROR``. +FEDMSG_NOTIFICATIONS +~~~~~~~~~~~~~~~~~~~~ + +This configuration key allows to turn on or off notifications via `fedmsg +`_. + +Defaults to: ``True``. + + ALLOW_DELETE_BRANCH ~~~~~~~~~~~~~~~~~~~ diff --git a/pagure/lib/notify.py b/pagure/lib/notify.py index 6165436..5867d68 100644 --- a/pagure/lib/notify.py +++ b/pagure/lib/notify.py @@ -40,6 +40,9 @@ if pagure_config['EVENTSOURCE_SOURCE']: def fedmsg_publish(*args, **kwargs): # pragma: no cover ''' Try to publish a message on the fedmsg bus. ''' + if not pagure_config.get('FEDMSG_NOTIFICATIONS', True): + return + # We catch Exception if we want :-p # pylint: disable=broad-except # Ignore message about fedmsg import