8000 Correctly compare repository full name. · github/VisualStudio@e714452 · GitHub
[go: up one dir, main page]

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

Commit e714452

Browse files
committed
Correctly compare repository full name.
Fixes opening links on enterprise instances. Previously we were comparing `repo.FullName == ActiveRepo.Name` which always failed as `repo.FullName` returns `owner/name` whereas `ActiveRepo.Name` just returns the `name` portion. Construct a full name for the active repo and check that. Fixes #1291
1 parent 10cc6d4 commit e714452

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/GitHub.VisualStudio/Menus/MenuBase.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ protected async Task<bool> IsGitHubRepo()
131131
if (!isdotcom)
132132
{
133133
var repo = await SimpleApiClient.GetRepository();
134-
return (repo.FullName == ActiveRepo.Name || repo.Id == 0) && SimpleApiClient.IsEnterprise();
134+
var activeRepoFullName = ActiveRepo.Owner + '/' + ActiveRepo.Name;
135+
return (repo.FullName == activeRepoFullName || repo.Id == 0) && SimpleApiClient.IsEnterprise();
135136
}
136137
return isdotcom;
137138
}

0 commit comments

Comments
 (0)
0