From bd1178a2068676d210749732c3421ff7a77697aa Mon Sep 17 00:00:00 2001 From: squiddy Date: Mon, 1 Apr 2024 20:01:22 +0800 Subject: [PATCH] merge loops, improve performance --- bot/src/cogs/projects.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/src/cogs/projects.py b/bot/src/cogs/projects.py index 159ab41..b176fd1 100644 --- a/bot/src/cogs/projects.py +++ b/bot/src/cogs/projects.py @@ -350,9 +350,9 @@ async def share( for github in list(github_accounts): if github[0].github in contributors: github_accounts.remove(github) + continue - # add everyone remaining to repo - for github in github_accounts: + # attempt to add to repo try: repo.add_to_collaborators(github[0].github, permission="maintain") # type: ignore except UnknownObjectException: