From ffe3cf28b9245da973cac0cbd45182df166c30e5 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Wed, 9 Sep 2020 20:51:28 +0200 Subject: [PATCH] pagure: hotfix notify.py so it doesn't send any emails for the 389-ds-base project, at all Fixes https://pagure.io/fedora-infrastructure/issue/9309 Signed-off-by: Pierre-Yves Chibon --- roles/pagure/frontend/files/notify.py | 4 ++++ roles/pagure/frontend/tasks/main.yml | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/roles/pagure/frontend/files/notify.py b/roles/pagure/frontend/files/notify.py index 0c124db96c..a81878d314 100644 --- a/roles/pagure/frontend/files/notify.py +++ b/roles/pagure/frontend/files/notify.py @@ -450,6 +450,10 @@ def send_email( msg["List-Archive"] = _build_url( pagure_config["APP_URL"], _fullname_to_url(project_name) ) + if project_name == "389-ds-base": + _log.info("Do not notify about 389-ds-base") + return + if reporter is not None: msg["X-pagure-reporter"] = reporter if assignee is not None: diff --git a/roles/pagure/frontend/tasks/main.yml b/roles/pagure/frontend/tasks/main.yml index 7f72eec99a..eec22dddb0 100644 --- a/roles/pagure/frontend/tasks/main.yml +++ b/roles/pagure/frontend/tasks/main.yml @@ -508,6 +508,18 @@ - pagure +# Install hotfix for the notify.py file for +# https://pagure.io/fedora-infrastructure/issue/9309 + +- name: Install the hotfixed notify.py + copy: src=notify.py + dest=/usr/lib/python3.6/site-packages/pagure/lib/notify.py + owner=root group=root mode=0644 + notify: restart httpd + tags: + - hotfix + - pagure + # Ensure all the services are up and running - name: Start and enable httpd, postfix, pagure_milter