summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-11-11 10:43:18 -0600
committerDan McGee <dan@archlinux.org>2011-11-11 10:43:18 -0600
commit022692b3f33de8c45741d3cb27fa95f9f6facdea (patch)
treed84d744dd060a922e599bb85334df8abe1c92569 /packages
parent21d5f818a60ab2626f941f8ff53e263e802494d5 (diff)
Show relevant signoffs on dashboard
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages')
-rw-r--r--packages/utils.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/utils.py b/packages/utils.py
index b21ac557..0df0e382 100644
--- a/packages/utils.py
+++ b/packages/utils.py
@@ -330,7 +330,7 @@ SELECT DISTINCT p1.pkgbase, r.name
cursor.execute(sql, params)
return dict(cursor.fetchall())
-def get_signoff_groups(repos=None):
+def get_signoff_groups(repos=None, user=None):
if repos is None:
repos = Repo.objects.filter(testing=True)
repo_ids = [r.pk for r in repos]
@@ -340,6 +340,11 @@ def get_signoff_groups(repos=None):
packages = test_pkgs.order_by('pkgname')
packages = attach_maintainers(packages)
+ # Filter by user if asked to do so
+ if user is not None:
+ packages = [p for p in packages if user == p.packager
+ or user in p.maintainers]
+
# Collect all pkgbase values in testing repos
pkgtorepo = get_target_repo_map(repos)