This commit is contained in:
Dmitry Afanasyev 2022-04-06 14:45:36 +03:00
parent 68b8e4d9f9
commit 2824f998ad
6 changed files with 10 additions and 5 deletions

View File

@ -1 +0,0 @@
X5_SCM_TOKEN=-xczQ_2we3ms8BAzkMNZ

Binary file not shown.

Binary file not shown.

View File

@ -6,7 +6,6 @@ from pathlib import Path
current_dir = Path(__file__).parent.parent current_dir = Path(__file__).parent.parent
# use loguru if it is possible for color output # use loguru if it is possible for color output
if importlib.util.find_spec('loguru') is not None: if importlib.util.find_spec('loguru') is not None:
from loguru import logger from loguru import logger

View File

@ -4,11 +4,12 @@ import sys
import time import time
import requests import requests
from get_project_core.settings import current_dir, logger # ,config
from get_project_core.settings import current_dir, logger
MY_GITLAB_TOKEN='' GITLAB_TOKEN = ''
headers = {'PRIVATE-TOKEN': MY_GITLAB_TOKEN}
headers = {'PRIVATE-TOKEN': GITLAB_TOKEN}
def create_repositories(group_id: int): def create_repositories(group_id: int):
@ -42,5 +43,10 @@ if __name__ == '__main__':
try: try:
group = args[0] group = args[0]
logger.info(group) logger.info(group)
create_repositories(group_id=int(group))
update_submodules()
except IndexError: except IndexError:
logger.error('Gitlab group id must be set') logger.error('Gitlab group id must be set')
except ValueError:
logger.error('Gitlab group id must be integer')

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
requests