script: updated take commit message from user
This commit is contained in:
1 file changed
+5
-3
@@ -1,12 +1,14 @@
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
def push_to_github(repo_path, commit_message):
|
||||
|
||||
def push_to_github(repo_path):
|
||||
os.chdir(repo_path)
|
||||
commit_message = input("Enter your commit message: ") # Take input from user
|
||||
subprocess.run(["git", "add", "."])
|
||||
subprocess.run(["git", "commit", "-m", commit_message])
|
||||
subprocess.run(["git", "push"])
|
||||
|
||||
|
||||
repo_path = r"C:\Users\nurpr\OneDrive\Desktop\Backend\news-portal"
|
||||
commit_message = "Automated commit message"
|
||||
push_to_github(repo_path, commit_message)
|
||||
push_to_github(repo_path)
|
||||
Reference in new issue
Block a user