mirror of
https://github.com/Balshgit/different
synced 2025-09-11 02:50:41 +03:00
update get-git-lab-project
This commit is contained in:
parent
c8780af4f6
commit
e2218ddf30
107
get-gitlab-projects/.gitignore
vendored
Normal file
107
get-gitlab-projects/.gitignore
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# celery beat schedule file
|
||||
celerybeat-schedule
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
|
||||
.idea/
|
||||
.vscode/
|
@ -1 +0,0 @@
|
||||
.env
|
@ -1,13 +1,10 @@
|
||||
import importlib.util
|
||||
import logging
|
||||
import sys
|
||||
|
||||
from decouple import AutoConfig
|
||||
from pathlib import Path
|
||||
|
||||
current_dir = Path(__file__).parent.parent
|
||||
config = AutoConfig(search_path=current_dir.joinpath('get_project_core'))
|
||||
|
||||
current_dir = Path(__file__).parent.parent
|
||||
|
||||
# use loguru if it is possible for color output
|
||||
if importlib.util.find_spec('loguru') is not None:
|
||||
|
@ -1,12 +1,15 @@
|
||||
import json # noqa # pylint: disable=unused-import
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
|
||||
import requests
|
||||
|
||||
from get_project_core.settings import logger, config, current_dir
|
||||
from get_project_core.settings import current_dir, logger
|
||||
|
||||
headers = {'PRIVATE-TOKEN': config('X5_SCM_TOKEN', cast=str)}
|
||||
GITLAB_TOKEN = ''
|
||||
|
||||
headers = {'PRIVATE-TOKEN': GITLAB_TOKEN}
|
||||
|
||||
|
||||
def create_repositories(group_id: int):
|
||||
@ -36,5 +39,13 @@ def update_submodules():
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
create_repositories(group_id=3574)
|
||||
# update_submodules()
|
||||
args = sys.argv[1:]
|
||||
try:
|
||||
group = args[0]
|
||||
logger.info(group)
|
||||
create_repositories(group_id=int(group))
|
||||
update_submodules()
|
||||
except IndexError:
|
||||
logger.error('Gitlab group id must be set')
|
||||
except ValueError:
|
||||
logger.error('Gitlab group id must be integer')
|
||||
|
1
get-gitlab-projects/requirements.txt
Normal file
1
get-gitlab-projects/requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
requests
|
Loading…
x
Reference in New Issue
Block a user