@@ -103,27 +103,6 @@ export class StartWorkCommand extends QuickCommand<State> {
103103 while ( this . canStepsContinue ( state ) ) {
104104 context . title = this . title ;
105105
106- const hasConnectedIntegrations = [ ...context . connectedIntegrations . values ( ) ] . some ( c => c ) ;
107- if ( ! hasConnectedIntegrations ) {
108- if ( this . container . telemetry . enabled ) {
109- this . container . telemetry . sendEvent (
110- opened ? 'startWork/steps/connect' : 'startWork/opened' ,
111- {
112- ...context . telemetryContext ! ,
113- connected : false ,
114- } ,
115- this . source ,
116- ) ;
117- }
118- const isUsingCloudIntegrations = configuration . get ( 'cloudIntegrations.enabled' , undefined , false ) ;
119- const result = isUsingCloudIntegrations
120- ? yield * this . confirmCloudIntegrationsConnectStep ( state , context )
121- : yield * this . confirmLocalIntegrationConnectStep ( state , context ) ;
122- if ( result === StepResultBreak ) {
123- return result ;
124- }
125- }
126-
127106 if ( state . counter < 1 ) {
128107 const result = yield * this . selectCommandStep ( state ) ;
129108 if ( result === StepResultBreak ) continue ;
@@ -132,6 +111,27 @@ export class StartWorkCommand extends QuickCommand<State> {
132111 }
133112
134113 if ( state . counter < 2 && ! state . action ) {
114+ const hasConnectedIntegrations = [ ...context . connectedIntegrations . values ( ) ] . some ( c => c ) ;
115+ if ( ! hasConnectedIntegrations ) {
116+ if ( this . container . telemetry . enabled ) {
117+ this . container . telemetry . sendEvent (
118+ opened ? 'startWork/steps/connect' : 'startWork/opened' ,
119+ {
120+ ...context . telemetryContext ! ,
121+ connected : false ,
122+ } ,
123+ this . source ,
124+ ) ;
125+ }
126+ const isUsingCloudIntegrations = configuration . get ( 'cloudIntegrations.enabled' , undefined , false ) ;
127+ const result = isUsingCloudIntegrations
128+ ? yield * this . confirmCloudIntegrationsConnectStep ( state , context )
129+ : yield * this . confirmLocalIntegrationConnectStep ( state , context ) ;
130+ if ( result === StepResultBreak ) {
131+ return result ;
132+ }
133+ }
134+
135135 await updateContextItems ( this . container , context ) ;
136136 const result = yield * this . pickIssueStep ( state , context ) ;
137137 if ( result === StepResultBreak ) continue ;
0 commit comments