@@ -33,6 +33,7 @@ public class GitHubConnectSection : TeamExplorerSectionBase, IGitHubConnectSecti
3333 readonly IVSServices vsServices ;
3434 readonly int sectionIndex ;
3535 readonly ILocalRepositories localRepositories ;
36+ readonly IUsageTracker usageTracker ;
3637
3738 bool isCloning ;
3839 bool isCreating ;
@@ -99,6 +100,7 @@ public GitHubConnectSection(IGitHubServiceProvider serviceProvider,
99100 IPackageSettings packageSettings ,
100101 IVSServices vsServices ,
101102 ILocalRepositories localRepositories ,
103+ IUsageTracker usageTracker ,
102104 int index )
103105 : base ( serviceProvider , apiFactory , holder , manager )
104106 {
@@ -108,6 +110,7 @@ public GitHubConnectSection(IGitHubServiceProvider serviceProvider,
108110 Guard . ArgumentNotNull ( packageSettings , nameof ( packageSettings ) ) ;
109111 Guard . ArgumentNotNull ( vsServices , nameof ( vsServices ) ) ;
110112 Guard . ArgumentNotNull ( localRepositories , nameof ( localRepositories ) ) ;
113+ Guard . ArgumentNotNull ( usageTracker , nameof ( usageTracker ) ) ;
111114
112115 Title = "GitHub" ;
113116 IsEnabled = true ;
@@ -118,6 +121,7 @@ public GitHubConnectSection(IGitHubServiceProvider serviceProvider,
118121 this . packageSettings = packageSettings ;
119122 this . vsServices = vsServices ;
120123 this . localRepositories = localRepositories ;
124+ this . usageTracker = usageTracker ;
121125
122126 Clone = CreateAsyncCommandHack ( DoClone ) ;
123127
@@ -141,6 +145,8 @@ await cloneService.CloneRepository(
141145 result . Repository . CloneUrl ,
142146 result . Repository . Name ,
143147 result . BasePath ) ;
148+
149+ usageTracker . IncrementCounter ( x => x . NumberOfGitHubConnectSectionClones ) . Forget ( ) ;
144150 }
145151 catch ( Exception e )
146152 {
0 commit comments