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

Commit bea26ab

Browse files
Only displaying the fork functionality for github.com repos
1 parent ea19904 commit bea26ab

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/GitHub.TeamFoundation.14/Home/ForkNavigationItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public override async void Invalidate()
9797
{
9898
IsVisible = false;
9999

100-
if ((packageSettings?.ForkButton ?? false) && await IsAGitHubRepo())
100+
if ((packageSettings?.ForkButton ?? false) && await IsAGitHubDotComRepo())
101101
{
102102
var connection = await ConnectionManager.GetConnection(ActiveRepo);
103103
IsVisible = connection?.IsLoggedIn ?? false;

src/GitHub.VisualStudio.UI/Base/TeamExplorerItemBase.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,12 @@ protected async Task<bool> IsAGitHubRepo()
141141
return origin == RepositoryOrigin.DotCom || origin == RepositoryOrigin.Enterprise;
142142
}
143143

144+
protected async Task<bool> IsAGitHubDotComRepo()
145+
{
146+
var origin = await GetRepositoryOrigin();
147+
return origin == RepositoryOrigin.DotCom;
148+
}
149+
144150
protected async Task<bool> IsUserAuthenticated()
145151
{
146152
if (SimpleApiClient == null)

0 commit comments

Comments
 (0)