Allow full committing power, return early when 0 commits found

This commit is contained in:
Xevion
2022-06-18 19:44:34 -05:00
parent d51471ff6a
commit 00e17cd798

View File

@@ -48,6 +48,10 @@ def main() -> None:
logger.info(f'All done fetching. {len(commits)} commits found.') 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 = config("REPOSITORY_PATH")
repository_path = os.path.abspath(repository_path) repository_path = os.path.abspath(repository_path)
if not os.path.exists(repository_path): if not os.path.exists(repository_path):
@@ -90,7 +94,6 @@ def main() -> None:
continue continue
logger.debug(f'Processed {commit.id} as {repo_commit.hexsha}') logger.debug(f'Processed {commit.id} as {repo_commit.hexsha}')
break
logger.info(f'Finished processing commits ({successful}/{len(commits)}).') logger.info(f'Finished processing commits ({successful}/{len(commits)}).')
logger.info('Pushing to origin...') logger.info('Pushing to origin...')