| |
@@ -31,6 +31,7 @@
|
| |
import bugzilla
|
| |
import koji
|
| |
import urllib.parse
|
| |
+ import re
|
| |
|
| |
from bodhi.client.bindings import BodhiClient
|
| |
from urllib3.util.retry import Retry
|
| |
@@ -279,9 +280,9 @@
|
| |
resp = get_json("https://src.fedoraproject.org/api/0/groups?per_page=100") # TODO: Handle pagination properly
|
| |
if not resp:
|
| |
return None
|
| |
+ allowed_groups = [re.compile(a) for a in app.config["ALLOWED_PACKAGER_GROUPS"]]
|
| |
for group in resp["groups"]:
|
| |
- if not group.endswith("-sig"):
|
| |
- # Only groups ending with "-sig" can own packages as per https://pagure.io/fedora-infrastructure/issue/5478#comment-9109
|
| |
+ if not any(regex.match(group) for regex in allowed_groups):
|
| |
continue
|
| |
app.logger.debug("Checking out Pagure group %s" % group)
|
| |
group_resp = get_json("https://src.fedoraproject.org/api/0/group/%s?projects=1&acl=commit" % group)
|
| |