Skip to content

Commit f0c1f5c

Browse files
committed
async
1 parent cccb753 commit f0c1f5c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

private-sec-reporting.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@ async def main():
5151

5252
for repo in repos:
5353
repo_name = repo['name']
54-
if repo['private']:
55-
print(f"{repo_name:>25}: [yellow]Private[/yellow]")
56-
continue
5754

5855
task = check_private_vulnerability_reporting(session, repo_name)
5956
tasks.append((repo_name, task))
6057

6158
results = await asyncio.gather(*[task for _, task in tasks])
6259

63-
for (repo_name, _), has_vuln_reporting in zip(tasks, results):
64-
print(f"{repo_name:>25}: {'[green]Enabled[/green]' if has_vuln_reporting else '[red]Disabled[/red]'}")
60+
for repo, (repo_name, _), has_vuln_reporting in zip(repos,tasks, results):
61+
if repo['private']:
62+
print(f"{repo_name:>25}: [yellow]Private[/yellow] {'[green]Enabled[/green]' if has_vuln_reporting else '[red]Disabled[/red]'}")
63+
else:
64+
print(f"{repo_name:>25}: {'[green]Enabled[/green]' if has_vuln_reporting else '[red]Disabled[/red]'}")
6565

6666
if __name__ == "__main__":
6767
asyncio.run(main())

0 commit comments

Comments
 (0)