remove old commented code
This commit is contained in:
@@ -68,57 +68,6 @@ class Migrator:
|
|||||||
|
|
||||||
self.__logger = logger
|
self.__logger = logger
|
||||||
|
|
||||||
"""
|
|
||||||
def _get_user_api(self, hostname, port, token) -> giteapy.UserApi:
|
|
||||||
|
|
||||||
conf = giteapy.Configuration()
|
|
||||||
conf.api_key['access_token'] = token
|
|
||||||
conf.host = self._make_api_base(hostname=hostname, port=port)
|
|
||||||
conf.verify_ssl = self.__verify_ssl
|
|
||||||
api = giteapy.UserApi(giteapy.ApiClient(conf))
|
|
||||||
|
|
||||||
return api
|
|
||||||
"""
|
|
||||||
|
|
||||||
"""
|
|
||||||
def _get_repo_api(self, hostname, port, token) -> giteapy.RepositoryApi:
|
|
||||||
|
|
||||||
conf = giteapy.Configuration()
|
|
||||||
conf.api_key['access_token'] = token
|
|
||||||
conf.host = self._make_api_base(hostname=hostname, port=port)
|
|
||||||
conf.verify_ssl = self.__verify_ssl
|
|
||||||
api = giteapy.RepositoryApi(giteapy.ApiClient(conf))
|
|
||||||
|
|
||||||
return api
|
|
||||||
"""
|
|
||||||
|
|
||||||
"""
|
|
||||||
def _get_org_apis(self) -> (giteapy.OrganizationApi, giteapy.OrganizationApi):
|
|
||||||
|
|
||||||
api_source = self._get_org_api(
|
|
||||||
hostname=self.__source_host, port=self.__source_port,
|
|
||||||
token=self.__source_token
|
|
||||||
)
|
|
||||||
api_destination = self._get_org_api(
|
|
||||||
hostname=self.__destination_host, port=self.__destination_port,
|
|
||||||
token=self.__destination_token
|
|
||||||
)
|
|
||||||
|
|
||||||
return api_source, api_destination
|
|
||||||
"""
|
|
||||||
|
|
||||||
"""
|
|
||||||
def _get_org_api(self, hostname, port, token) -> giteapy.OrganizationApi:
|
|
||||||
|
|
||||||
conf = giteapy.Configuration()
|
|
||||||
conf.api_key['access_token'] = token
|
|
||||||
conf.host = self._make_api_base(hostname=hostname, port=port)
|
|
||||||
conf.verify_ssl = self.__verify_ssl
|
|
||||||
api = giteapy.OrganizationApi(giteapy.ApiClient(conf))
|
|
||||||
|
|
||||||
return api
|
|
||||||
"""
|
|
||||||
|
|
||||||
def _make_destination_repo_name(self, pattern: str, repo: gitea.Repository):
|
def _make_destination_repo_name(self, pattern: str, repo: gitea.Repository):
|
||||||
|
|
||||||
repo_name = pattern.replace(self.__REPO_ORIGINAL_NAME_TOKEN, repo.name)
|
repo_name = pattern.replace(self.__REPO_ORIGINAL_NAME_TOKEN, repo.name)
|
||||||
|
|||||||
Reference in New Issue
Block a user