File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -138,14 +138,13 @@ async def run_targeted_check(
138138 branch : str | None = None ,
139139) -> bool :
140140 filters = {}
141- param_value = list (check_module .definition .parameters .values ())
142- if param_value :
143- filters [param_value [0 ]] = check_module .definition .targets
144-
145- param_key = list (check_module .definition .parameters .keys ())
146141 identifier = None
147- if param_key :
148- identifier = param_key [0 ]
142+ identifier_attribute = None
143+ # TODO: Does this support multiple parameters and we need make identifiers a dict to iterate over on L166-168?
144+ for param_key , param_value in check_module .definition .parameters .items ():
145+ filters [param_value ] = check_module .definition .targets
146+ identifier = param_key
147+ identifier_attribute = param_value .split ("__" )[0 ]
149148
150149 check_summary : list [bool ] = []
151150 if variables :
@@ -164,8 +163,8 @@ async def run_targeted_check(
164163 await targets .members .fetch ()
165164 for member in targets .members .peers :
166165 check_parameter = {}
167- if identifier :
168- attribute = getattr (member .peer , identifier )
166+ if identifier and identifier_attribute :
167+ attribute = getattr (member .peer , identifier_attribute )
169168 check_parameter = {identifier : attribute .value }
170169 result = await run_check (
171170 check_module = check_module ,
You can’t perform that action at this time.
0 commit comments