commit 5189d3d898ab20bb0d965d1066ff332cdc78189b
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu Oct 8 09:49:05 2015 +0200
Add an utility method to comment on a bugzilla ticket
pkgdb2client/utils.py | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/pkgdb2client/utils.py b/pkgdb2client/utils.py
index b2fd87e..e7ce19a 100644
--- a/pkgdb2client/utils.py
+++ b/pkgdb2client/utils.py
@@ -83,6 +83,20 @@ def get_bugz(pkg_name):
return bugbz
+def comment_on_bug(bugid, comment):
+ ''' Comment on a bugzilla ticket.
+
+ :arg bugid: the identifier of the bug in bugzilla
+ :arg comment: the comment to post on that ticket
+
+ '''
+ bug = get_bug(bugid)
+
+ bug.addcomment(comment)
+
+ return bug
+
+
def get_bug(bugid):
''' Return the bug with the specified identifier.
Show replies by date