@@ -243,7 +243,7 @@ def get_repositories_of_organisation(
243243
244244def scan_with_config (
245245 github_token : str , firetail_app_token : str , firetail_api_url : str , config : Config
246- ) -> tuple [set [str ], int ]:
246+ ) -> tuple [set [GithubRepository ], int ]:
247247 github_client = github .Github (github_token )
248248
249249 repositories_to_scan = set ()
@@ -294,7 +294,7 @@ def scan_with_config(
294294
295295def scan_without_config (
296296 github_token : str , firetail_app_token : str , firetail_api_url : str
297- ) -> tuple [int , int ]:
297+ ) -> tuple [set [ GithubRepository ] , int ]:
298298 github_client = github .Github (github_token )
299299
300300 organisations_to_scan : set [GithubOrganisation ] = respect_rate_limit (get_organisations_of_user (github_client ))
@@ -334,6 +334,12 @@ def scan() -> tuple[set[str], int]:
334334 logger .warning (f"Failed to load config.yml, exception: { yaml_exception } " )
335335
336336 if config_dict is not None :
337- return scan_with_config (GITHUB_TOKEN , FIRETAIL_APP_TOKEN , FIRETAIL_API_URL , from_dict (Config , config_dict ))
337+ repositories_scanned , openapi_specs_discovered = scan_with_config (
338+ GITHUB_TOKEN , FIRETAIL_APP_TOKEN , FIRETAIL_API_URL , from_dict (Config , config_dict )
339+ )
338340 else :
339- return scan_without_config (GITHUB_TOKEN , FIRETAIL_APP_TOKEN , FIRETAIL_API_URL )
341+ repositories_scanned , openapi_specs_discovered = scan_without_config (
342+ GITHUB_TOKEN , FIRETAIL_APP_TOKEN , FIRETAIL_API_URL
343+ )
344+
345+ return {repository .full_name for repository in repositories_scanned }, openapi_specs_discovered
0 commit comments