mirror of
https://gitflic.ru/project/dbi471/git-switch.git
synced 2025-07-03 02:35:25 +00:00
Подправил нейминг; Добавил коментарии.
This commit is contained in:
parent
d141a28d6a
commit
49df43c7ab
9
main.py
9
main.py
@ -71,6 +71,7 @@ class GitSwitch:
|
|||||||
self.github_repos = self.gh_user.get_repos()
|
self.github_repos = self.gh_user.get_repos()
|
||||||
|
|
||||||
def get_github_repo(self, repo_info) -> Union[Repo, None]:
|
def get_github_repo(self, repo_info) -> Union[Repo, None]:
|
||||||
|
""" Получаем репозиторий с GitHub """
|
||||||
login = self.get_login(repo_info)
|
login = self.get_login(repo_info)
|
||||||
name = repo_info.name
|
name = repo_info.name
|
||||||
path = os.path.join(self.clone_folder, login, name)
|
path = os.path.join(self.clone_folder, login, name)
|
||||||
@ -88,9 +89,11 @@ class GitSwitch:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def push_into_gitflic(self, repo, url) -> bool:
|
def push_into_gitflic(self, repo, url) -> bool:
|
||||||
return False
|
""" Пушим репозиторий на GitFlic """
|
||||||
|
pass
|
||||||
|
|
||||||
def clone(self):
|
def run(self):
|
||||||
|
""" Запуск основной части """
|
||||||
for repo_info in self.github_repos:
|
for repo_info in self.github_repos:
|
||||||
github_repo = self.get_github_repo(repo_info)
|
github_repo = self.get_github_repo(repo_info)
|
||||||
if not github_repo: continue
|
if not github_repo: continue
|
||||||
@ -111,7 +114,7 @@ class GitSwitch:
|
|||||||
log.info("Stopped by the user.")
|
log.info("Stopped by the user.")
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
self.clone()
|
self.run()
|
||||||
|
|
||||||
|
|
||||||
# Инициализируем наши аргументы
|
# Инициализируем наши аргументы
|
||||||
|
Loading…
x
Reference in New Issue
Block a user