feat: skip commit & push on nothing changed

This commit is contained in:
张泊明518370910136 2024-09-30 06:19:34 -04:00
parent cc9cb3224c
commit 9d4d4eb7fe
GPG Key ID: CA088E6D9284F870

View File

@ -114,6 +114,6 @@ class Git:
f'File path "{file}" does not exist. Skipping this file.'
)
continue
if repo.is_dirty(untracked_files=True) or repo.index.diff(None):
repo.index.commit(commit_message)
origin = repo.remote(name="origin")
origin.push()
repo.remote(name="origin").push()