Skip to content

Commit 9b88c4c

Browse files
Fixes the flow to continue after user needed to connect an integration (#3750)
(#3621, #3750) Co-authored-by: Chivorotkiv <[email protected]>
1 parent 1b2e8cd commit 9b88c4c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/plus/startWork/startWork.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export class StartWorkCommand extends QuickCommand<State> {
103103

104104
let opened = false;
105105
while (this.canStepsContinue(state)) {
106-
const hasConnectedIntegrations = [...context.connectedIntegrations.values()].some(c => c);
106+
const hasConnectedIntegrations = this.hasConnectedIntegrations(context);
107107
context.title = this.title;
108108

109109
if (state.counter < 1) {
@@ -159,6 +159,11 @@ export class StartWorkCommand extends QuickCommand<State> {
159159
if (result === StepResultBreak) {
160160
return result;
161161
}
162+
context.connectedIntegrations = await this.getConnectedIntegrations();
163+
if (!this.hasConnectedIntegrations(context)) {
164+
state.counter--;
165+
continue;
166+
}
162167
}
163168

164169
await updateContextItems(this.container, context);
@@ -513,6 +518,10 @@ export class StartWorkCommand extends QuickCommand<State> {
513518

514519
return connected;
515520
}
521+
522+
private hasConnectedIntegrations(context: Context) {
523+
return [...context.connectedIntegrations.values()].some(c => c);
524+
}
516525
}
517526

518527
async function updateContextItems(container: Container, context: Context) {

0 commit comments

Comments
 (0)