forked from KalleHallden/ProjectInitializationAutomation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate.py
More file actions
20 lines (16 loc) · 474 Bytes
/
create.py
File metadata and controls
20 lines (16 loc) · 474 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import sys
import os
from github import Github
from dotenv import load_dotenv
load_dotenv()
path = os.getenv("FILEPATH")
username = os.getenv("USERNAME")
password = os.getenv("PASSWORD")
def create():
folderName = str(sys.argv[1])
os.makedirs(path + str(folderName))
user = Github(username, password).get_user()
repo = user.create_repo(folderName)
print("Succesfully created repository {}".format(folderName))
if __name__ == "__main__":
create()