From 00e17cd79892fdc2f7c5980809596f875705a253 Mon Sep 17 00:00:00 2001 From: Xevion Date: Sat, 18 Jun 2022 19:44:34 -0500 Subject: [PATCH] Allow full committing power, return early when 0 commits found --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 09f9da0..1d59b38 100644 --- a/main.py +++ b/main.py @@ -48,6 +48,10 @@ def main() -> None: logger.info(f'All done fetching. {len(commits)} commits found.') + if len(commits) == 0: + logger.info('0 commits found. Quitting early.') + return + repository_path = config("REPOSITORY_PATH") repository_path = os.path.abspath(repository_path) if not os.path.exists(repository_path): @@ -90,7 +94,6 @@ def main() -> None: continue logger.debug(f'Processed {commit.id} as {repo_commit.hexsha}') - break logger.info(f'Finished processing commits ({successful}/{len(commits)}).') logger.info('Pushing to origin...')