summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Maas <opensource@till.name>2011-08-19 19:52:03 +0200
committerTill Maas <opensource@till.name>2011-08-19 19:52:03 +0200
commit1ca0f0cfe4a436c49a6ffd7c3d11881cfd3f9f18 (patch)
treeb0b314729447e3a4ca575eecce04c0f7db62e2cb
parentf70e9b6d38091de08ab9a31a52a2ee2bff5b30e7 (diff)
downloadfedora-easy-karma-1ca0f0cfe4a436c49a6ffd7c3d11881cfd3f9f18.tar.gz
fedora-easy-karma-1ca0f0cfe4a436c49a6ffd7c3d11881cfd3f9f18.tar.xz
fedora-easy-karma-1ca0f0cfe4a436c49a6ffd7c3d11881cfd3f9f18.zip
Display test_cases info from Bodhi
-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: