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 @@
+
diff --git a/static/ui.js b/static/ui.js index eb9b422a..2e7c88fd 100644 --- a/static/ui.js +++ b/static/ui.js @@ -2832,6 +2832,17 @@ function _showUpdateBanner(data){ const banner=$('updateBanner'); if(banner) banner.classList.add('visible'); window._updateData=data; + // Wire up "What's new?" link + const link=$('updateWhatsNew'); + if(link && data.webui){ + const repoUrl=data.webui.repo_url; + const curSha=data.webui.current_sha; + const newSha=data.webui.latest_sha; + if(repoUrl && curSha && newSha){ + link.href=repoUrl+'/compare/'+curSha+'...'+newSha; + link.style.display='inline'; + } + } } function dismissUpdate(){ const b=$('updateBanner');if(b)b.classList.remove('visible');