commit 9fb5bde435ce954d65c98b65b915857f4d4ad5c2
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue Dec 1 12:17:23 2015 +0100
Check the component and product of the review request
Fixes
https://github.com/fedora-infra/packagedb-cli/issues/57
pkgdb2client/utils.py | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/pkgdb2client/utils.py b/pkgdb2client/utils.py
index adb1b18..d69d2cd 100644
--- a/pkgdb2client/utils.py
+++ b/pkgdb2client/utils.py
@@ -239,6 +239,16 @@ def check_package_creation(info, bugid, pkgdbclient):
'The bug title does not fit the expected one\n'
' exp: "{0}" vs obs: "{1}"'.format(expected,
bug.summary))
+ if bug.component != 'Package Review':
+ messages["bad"].append(
+ 'Wrong bug component \n'
+ ' exp: "Package Review" vs obs:
"{0}"'.format(bug.component))
+
+ if bug.product != 'Fedora':
+ messages["bad"].append(
+ 'Wrong bug product \n'
+ ' exp: "Fedora" vs obs:
"{0}"'.format(bug.product))
+
# Check if the participants are packagers
for user in get_users_in_bug(bugid):
if not is_packager(user):