| |
@@ -48,6 +48,7 @@
|
| |
bugzilla_bug_url="https://bugzilla.redhat.com/",
|
| |
test_cases_url="https://fedoraproject.org/wiki/",
|
| |
wrap_bugs=True,
|
| |
+ skip_bodhi_comments=False,
|
| |
width=80):
|
| |
|
| |
# copy update to avoid side effects
|
| |
@@ -156,6 +157,9 @@
|
| |
# the format of the user has changed, add a data member
|
| |
comment["username"] = comment["user"]["name"]
|
| |
|
| |
+ if comment['username'] == 'bodhi' and skip_bodhi_comments:
|
| |
+ continue
|
| |
+
|
| |
comments.append(
|
| |
"%(indent)s%(username)s - %(timestamp)s "
|
| |
"(karma %(karma)s)" % comment
|
| |
@@ -404,6 +408,12 @@
|
| |
default=3,
|
| |
type="int")
|
| |
parser.add_option("",
|
| |
+ "--skip-bodhi-comments",
|
| |
+ dest="skip_bodhi_comments",
|
| |
+ help="Do not show comments created by bodhi",
|
| |
+ action="store_true",
|
| |
+ default=False)
|
| |
+ parser.add_option("",
|
| |
"--wrap-bugs",
|
| |
dest="wrap_bugs",
|
| |
help="Apply line-wrapping to bugs",
|
| |
@@ -650,7 +660,8 @@
|
| |
print(FEK_helper.bodhi_update_str(
|
| |
update, bodhi_base_url=self.bc.base_url,
|
| |
width=self.options.wrap_width,
|
| |
- wrap_bugs=self.options.wrap_bugs
|
| |
+ wrap_bugs=self.options.wrap_bugs,
|
| |
+ skip_bodhi_comments=self.options.skip_bodhi_comments
|
| |
))
|
| |
if self.options.wrap_rpms:
|
| |
print(FEK_helper.wrap_paragraphs_prefix(
|
| |
Sometimes, Bodhi comments can be annoying for some users and
they wish for cleaner process. This adds a CLI switch --nobodhi
to surpress those comments and only show comments posted by
real users.
Fixes: https://pagure.io/fedora-easy-karma/issue/36