mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-02-06 08:46:21 +01:00
Fixed check git repositories
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
63cb9597c8
commit
2124bd47fd
1 changed files with 4 additions and 4 deletions
|
@ -172,11 +172,11 @@ class Repositories: # pylint: disable=[R0902]
|
|||
path_parts = parsed_url.path.strip("/").split("/")
|
||||
owner = path_parts[0]
|
||||
repository_name: str = path_parts[1].replace('.git', '')
|
||||
if 'github.com' in sbo_git_mirror and sbo_repo_path.is_dir():
|
||||
if 'github.com' in sbo_git_mirror and Path(sbo_repo_path, '.git/').is_dir():
|
||||
branch: str = utils.get_git_branch(sbo_repo_path)
|
||||
sbo_repo_mirror: str = f'https://raw.githubusercontent.com/{owner}/{repository_name}/{branch}/'
|
||||
|
||||
if 'gitlab.com' in sbo_git_mirror and sbo_repo_path.is_dir():
|
||||
if 'gitlab.com' in sbo_git_mirror and Path(sbo_repo_path, '.git/').is_dir():
|
||||
branch: str = utils.get_git_branch(sbo_repo_path)
|
||||
sbo_repo_mirror: str = f'https://gitlab.com/{owner}/{repository_name}/-/raw/{branch}/'
|
||||
|
||||
|
@ -191,11 +191,11 @@ class Repositories: # pylint: disable=[R0902]
|
|||
owner = path_parts[0]
|
||||
repository_name: str = path_parts[1].replace('.git', '')
|
||||
|
||||
if 'github.com' in ponce_git_mirror and ponce_repo_path.is_dir():
|
||||
if 'github.com' in ponce_git_mirror and Path(ponce_repo_path, '.git/').is_dir():
|
||||
branch: str = utils.get_git_branch(ponce_repo_path)
|
||||
ponce_repo_mirror: str = f'https://raw.githubusercontent.com/{owner}/{repository_name}/{branch}/'
|
||||
|
||||
if 'gitlab.com' in ponce_git_mirror and ponce_repo_path.is_dir():
|
||||
if 'gitlab.com' in ponce_git_mirror and Path(ponce_repo_path, '.git/').is_dir():
|
||||
branch: str = utils.get_git_branch(ponce_repo_path)
|
||||
ponce_repo_mirror: str = f'https://gitlab.com/{owner}/{repository_name}/-/raw/{branch}/'
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue