diff --git a/api/updates.py b/api/updates.py index 953cbe2e..1c286970 100644 --- a/api/updates.py +++ b/api/updates.py @@ -150,12 +150,21 @@ def _check_repo(path, name): current, _ = _run_git(['rev-parse', '--short', 'HEAD'], path) latest, _ = _run_git(['rev-parse', '--short', compare_ref], path) + # Get repo URL for "What's new?" link + remote_url, _ = _run_git(['remote', 'get-url', 'origin'], path) + # Convert SSH URLs (git@github.com:org/repo.git) to HTTPS + if remote_url and remote_url.startswith('git@'): + remote_url = remote_url.replace(':', '/', 1).replace('git@', 'https://', 1).rstrip('.git') + elif remote_url: + remote_url = remote_url.rstrip('.git') + return { 'name': name, 'behind': behind, 'current_sha': current, 'latest_sha': latest, 'branch': compare_ref, + 'repo_url': remote_url, } diff --git a/static/index.html b/static/index.html index 287f5ba1..a7834ae3 100644 --- a/static/index.html +++ b/static/index.html @@ -260,6 +260,7 @@