Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit d2c4669

Browse files
committed
Change to using ToRepositoryUrl from UriString
1 parent 7b85e1f commit d2c4669

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/GitHub.App/ViewModels/GitHubPane/PullRequestDetailViewModel.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ public async Task InitializeAsync(
329329
LocalRepository = localRepository;
330330
RemoteRepositoryOwner = owner;
331331
Number = number;
332-
WebUrl = ToPullRequestUrl(localRepository.CloneUrl.Host, owner, localRepository.Name, number);
332+
WebUrl = localRepository.CloneUrl.ToRepositoryUrl(owner);
333333
modelService = await modelServiceFactory.CreateAsync(connection);
334334

335335
await Refresh();
@@ -345,12 +345,6 @@ public async Task InitializeAsync(
345345
}
346346
}
347347

348-
static Uri ToPullRequestUrl(string host, string owner, string repositoryName, int number)
349-
{
350-
var url = string.Format(CultureInfo.InvariantCulture, "https://{0}/{1}/{2}/pull/{3}", host, owner, repositoryName, number);
351-
return new Uri(url);
352-
}
353-
354348
void RefreshIfActive(object sender, EventArgs e)
355349
{
356350
if (active)

0 commit comments

Comments
 (0)