feat: update policy for updating ComfyUI

https://github.com/ltdrdata/ComfyUI-Manager/issues/1552

fixed: comfyui versions should be based on commit date
https://github.com/ltdrdata/ComfyUI-Manager/issues/1566

fixed: invalid identifying of nightly node packs which has `git@github.com:...` url
fixed: switch comfyui should be based on `master` branch instead of `main` branch
fixed: switch_to_default_branch - more robust switching
refactor: endpoints for policies
This commit is contained in:
Dr.Lt.Data
2025-02-19 20:59:08 +09:00
parent 41172be796
commit 5dd8ea8aab
7 changed files with 190 additions and 60 deletions

View File

@@ -53,7 +53,14 @@ def git_url(fullpath):
def normalize_url(url) -> str:
if 'github' in url or (GITHUB_ENDPOINT is not None and GITHUB_ENDPOINT in url):
author = os.path.basename(os.path.dirname(url))
if author.startswith('git@github.com:'):
author = author.split(':')[1]
repo_name = os.path.basename(url)
if repo_name.endswith('.git'):
repo_name = repo_name[:-4]
url = f"https://github.com/{author}/{repo_name}"
return url