Last active
November 26, 2021 04:59
-
-
Save FernandoCelmer/12dc996dde1ac89beb2b46118a723e10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
print('Option: ') | |
options = ['UPY-#', 'CS2-', 'No Task', 'Sem Tarefa'] | |
for index, text_option in enumerate(options): | |
print(str(index) + " - "+ options[index]) | |
option_num = int(input()) | |
option = options[option_num] | |
print('Branch: ') | |
list_branch = input() | |
if type(list_branch) == str: | |
list_branch = list_branch.split(",") | |
if list_branch: | |
for branch in list_branch: | |
os.system("git checkout develop") | |
if option_num in [2,3]: | |
os.system("git checkout -b " + str(branch)) | |
os.system("git push --set-upstream origin " + str(branch)) | |
else: | |
os.system("git checkout -b " + str(option) + str(branch)) | |
os.system("git push --set-upstream origin " + str(option) + str(branch)) | |
os.system("git checkout develop") | |
print("===== Created branch " + str(branch)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment