Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions tools/SetupFlow/DevHome.SetupFlow/ViewModels/PackageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
Expand Down Expand Up @@ -150,7 +151,7 @@ public PackageViewModel(
/// For packages from winget or custom catalogs:
/// 1. Use package url
/// 2. Else, use publisher url
/// 3. Else, use "https://github.com/microsoft/winget-pkgs"
/// 3. Else, use the folder path of the manifest in microsoft/winget-pkgs repository
///
/// For packages from ms store catalog:
/// 1. Use package url
Expand All @@ -174,7 +175,7 @@ public Uri GetLearnMoreUri()
return _package.PublisherUrl;
}

return new Uri("https://github.com/microsoft/winget-pkgs");
return new Uri(GetWinGetRepositoryManifestPath());
}

partial void OnIsSelectedChanged(bool value) => SelectionChanged?.Invoke(this, value);
Expand Down Expand Up @@ -261,6 +262,13 @@ private string GetPackageFullDescription()
return CatalogName;
}

private string GetWinGetRepositoryManifestPath()
{
var initial = _package.Id.First().ToString().ToLowerInvariant();
var packageChildPath = _package.Id.Replace('.', '/');
return $"https://github.com/microsoft/winget-pkgs/tree/master/manifests/{initial}/{packageChildPath}";
}

/// <summary>
/// Indicates if a specific version of the package can be selected to install
/// </summary>
Expand Down