-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit_auto.py
More file actions
27 lines (21 loc) · 706 Bytes
/
Copy pathgit_auto.py
File metadata and controls
27 lines (21 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import os
def auto(message):
os.system('git add .')
os.system(f'git commit -m \"{message}\"')
os.system('git push -u origin main')
def question(name):
os.system('git add .')
os.system(f'git commit -m \"{name} done\"')
os.system('git push -u origin main')
def main():
option = int(input("Choose option \n1. Enter a message \n2. Completed a question \nany other key to quit \ninput : "))
if(option == 1):
message = input("Enter the commit message : ")
auto(message)
elif(option == 2):
name = input("Enter the name of the question : ")
question(name)
else:
return
if __name__ == "__main__":
main()