File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
buildbot_nix/buildbot_nix Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -123,11 +123,16 @@ def filter_repos(
123
123
user : Callable [[Y ], str ],
124
124
topics : Callable [[Y ], list [str ]],
125
125
) -> list [Y ]:
126
+ # This is a bit complicated so let me explain:
127
+ # If both `user_allowlist` and `repo_allowlist` are `None` then we want to allow everything,
128
+ # however if either are non-`None`, then the one that is non-`None` determines whether to
129
+ # allow a repo, or both if both are non-+None`.
130
+
126
131
return list (
127
132
filter (
128
133
lambda repo : (user_allowlist is None and repo_allowlist is None )
129
- or (user_allowlist is None or user (repo ) in user_allowlist )
130
- or (repo_allowlist is None or repo_name (repo ) in repo_allowlist ),
134
+ or (user_allowlist is not None and user (repo ) in user_allowlist )
135
+ or (repo_allowlist is not None and repo_name (repo ) in repo_allowlist ),
131
136
filter (
132
137
lambda repo : topic is None or topic in topics (repo ),
133
138
repos ,
You can’t perform that action at this time.
0 commit comments