mirror of
https://github.com/Balshgit/get-gitlab-projects.git
synced 2025-09-10 19:20:41 +03:00
fix main
This commit is contained in:
parent
68b8e4d9f9
commit
2824f998ad
@ -1 +0,0 @@
|
|||||||
X5_SCM_TOKEN=-xczQ_2we3ms8BAzkMNZ
|
|
BIN
get_project_core/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
get_project_core/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
get_project_core/__pycache__/settings.cpython-310.pyc
Normal file
BIN
get_project_core/__pycache__/settings.cpython-310.pyc
Normal file
Binary file not shown.
@ -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
|
||||||
|
@ -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
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
requests
|
Loading…
x
Reference in New Issue
Block a user