summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfedora-easy-karma.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/fedora-easy-karma.py b/fedora-easy-karma.py
index d3de40b..4ce9052 100755
--- a/fedora-easy-karma.py
+++ b/fedora-easy-karma.py
@@ -47,7 +47,7 @@ from fedora.client.bodhi import BodhiClient
class FEK_helper(object):
@staticmethod
- def bodhi_update_str(update, bodhi_base_url="https://admin.fedoraproject.org/updates/", bugzilla_bug_url="https://bugzilla.redhat.com/", wrap_bugs=True, width=80):
+ def bodhi_update_str(update, bodhi_base_url="https://admin.fedoraproject.org/updates/", bugzilla_bug_url="https://bugzilla.redhat.com/", test_cases_url="https://fedoraproject.org/wiki/", wrap_bugs=True, width=80):
# copy update to avoid side effects
values = dict(update)
@@ -62,6 +62,7 @@ class FEK_helper(object):
" Karma: %(karma)d\n"
"%(request)s"
"%(bugs)s"
+ "%(test_cases)s"
"%(notes)s"
" Submitter: %(submitter)s\n"
" Submitted: %(date_submitted)s\n"
@@ -100,6 +101,12 @@ class FEK_helper(object):
else:
values["bugs"] = ""
+ if update["nagged"] and "test_cases" in update["nagged"]:
+ test_cases = ["%s%s" % (test_cases_url, t.replace(" ", "_").replace(":", "%3A")) for t in update["nagged"]["test_cases"]]
+ values["test_cases"] = "%s\n" % FEK_helper.wrap_paragraphs_prefix(test_cases, first_prefix=" Test Cases: ", width=width, extra_newline=True)
+ else:
+ values["test_cases"] = ""
+
if update["notes"]:
values["notes"] = "%s\n" % FEK_helper.wrap_paragraphs_prefix(update["notes"].split("\r\n"), first_prefix=" Notes: ", width=width)
else: