From e057c590c720aa7bf5d0b64208b40448bb5bfb24 Mon Sep 17 00:00:00 2001 From: pliny <133052465+elder-plinius@users.noreply.github.com> Date: Sat, 10 Feb 2024 22:13:32 -0800 Subject: [PATCH] Delete autocommit.py --- autocommit.py | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 autocommit.py diff --git a/autocommit.py b/autocommit.py deleted file mode 100644 index 38d97806..00000000 --- a/autocommit.py +++ /dev/null @@ -1,32 +0,0 @@ -import os -import datetime -import time - -# Configure your repository details -repo_path = '.' -file_path = 'example.py' -commit_message = 'swarm' - -def make_change_and_commit(repo_path, file_path, commit_message): - # Change to the repository directory - os.chdir(repo_path) - - # Make a change in the file - with open(file_path, 'a') as file: - file.write('.') # Appending a dot to the file - - # Add the file to staging - os.system('git add ' + file_path) - - # Commit the change - current_time = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") - os.system(f'git commit -m "{commit_message} at {current_time}"') - - # Push the commit - os.system('git push') - -if __name__ == "__main__": - while True: - make_change_and_commit(repo_path, file_path, commit_message) - print("Commit made. Waiting 10 seconds for the next commit.") - time.sleep(10) # Wait for 10 seconds before the next iteration