On Sunday 20 January 2008, Dennis Gilmore wrote:
> On Sunday 20 January 2008, Jesse Keating wrote:
> > On Sun, 20 Jan 2008 20:32:46 -0600
> >
> > Dennis Gilmore <[EMAIL PROTECTED]> wrote:
> > > I have no issues with that at all.  i would prefer we do it so we are
> > > not carrying patches.  Id like to see the patches that i submitted
> > > included also. It will help in secondary arch ramp up over the next
> > > couple of weeks
> >
> > https://fedorahosted.org/koji/changeset/6feae640c291ae24de8e855b8564ff786
> >52 7dcb9  ?  Where there others as of yet not committed?
>
> https://www.redhat.com/archives/fedora-buildsys-list/2008-January/msg00045.
>html
>
> that one is not yet commited.  It adds the config option so we dont spam
> maintainers with a bunch of email for successful builds.
>
> Dennis

here is the updated patch.  if its too late thats ok

Dennis

From 61b4c4f156378d8feee9ff7af86c8d123f17725b Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <[EMAIL PROTECTED]>
Date: Mon, 14 Jan 2008 22:00:43 -0600
Subject: [PATCH] make a configurable option to send email for success or not

---
 hub/httpd.conf |    1 +
 hub/kojihub.py |   16 +++++++++-------
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/hub/httpd.conf b/hub/httpd.conf
index e4acd64..5d3f5e1 100644
--- a/hub/httpd.conf
+++ b/hub/httpd.conf
@@ -32,6 +32,7 @@ Alias /kojihub "/usr/share/koji-hub/XMLRPC"
         # The domain name that will be appended to Koji usernames
         # when creating email notifications
         PythonOption EmailDomain example.com
+        PythonOption NotifyOnSuccess False
         # PythonOption KojiDebug On
         # PythonOption KojiTraceback "extended"
         # sending tracebacks to the client isn't very helpful for debugging xmlrpc
diff --git a/hub/kojihub.py b/hub/kojihub.py
index 9a75552..5a4cfc7 100644
--- a/hub/kojihub.py
+++ b/hub/kojihub.py
@@ -3551,13 +3551,15 @@ def get_notification_recipients(build, tag_id, state):
     emails = [result[0] for result in _fetchMulti(query, locals())]
 
     email_domain = context.opts['EmailDomain']
-
-    # user who submitted the build
-    emails.append('[EMAIL PROTECTED]' % (build['owner_name'], email_domain))
-
-    packages = readPackageList(pkgID=package_id, tagID=tag_id, inherit=True)
-    # owner of the package in this tag, following inheritance
-    emails.append('[EMAIL PROTECTED]' % (packages[package_id]['owner_name'], email_domain))
+    notifyonsuccess = context.opts['NotifyOnSuccess'] 
+  
+    if notfyonsuccess == 'True' or state != koji.BUILD_STATES['COMPLETE']: 
+        # user who submitted the build
+        emails.append('[EMAIL PROTECTED]' % (build['owner_name'], email_domain))
+
+        packages = readPackageList(pkgID=package_id, tagID=tag_id, inherit=True)
+        # owner of the package in this tag, following inheritance
+        emails.append('[EMAIL PROTECTED]' % (packages[package_id]['owner_name'], email_domain))
 
     emails_uniq = dict(zip(emails, [1] * len(emails))).keys()
     return emails_uniq
-- 
1.5.3.8

Attachment: signature.asc
Description: This is a digitally signed message part.

--
Fedora-buildsys-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/fedora-buildsys-list

Reply via email to