commit message from python script

This commit is contained in:
2023-09-03 17:55:39 +02:00
parent 0d0b2b357c
commit 0d0821239c

View File

@@ -24,13 +24,13 @@ class my_git():
if not repo.is_dirty(untracked_files=True): if not repo.is_dirty(untracked_files=True):
print('No Changes detected in Folder', git_folder, sep=" ") print('No Changes detected in Folder', git_folder, sep=" ")
else: else:
print("Changes detected.") print("Changes detected in Folder", git_folder, sep=" ")
for remote in repo.remotes: for remote in repo.remotes:
print(remote.name, remote.url)
repo.git.add('--all') repo.git.add('--all')
repo.git.commit('-m', 'commit message from python script') repo.git.commit('-m', 'commit message from python script')
remote_name = repo.remote(name=remote.name) remote_name = repo.remote(name=remote.name)
remote_name.push() remote_name.push()
print("Push to", remote.url, sep=" ")
def git_main(self): def git_main(self):
list_git_folder = my_git.check_folder(self) list_git_folder = my_git.check_folder(self)