diff --git a/services/github/pod-github/src/sync/comments.ts b/services/github/pod-github/src/sync/comments.ts index a9a227f702..5e33bc4a7e 100644 --- a/services/github/pod-github/src/sync/comments.ts +++ b/services/github/pod-github/src/sync/comments.ts @@ -248,7 +248,7 @@ export class CommentSyncManager implements DocSyncManager { ): Promise | undefined> { const container = await this.provider.getContainer(info.space) if (container?.container === undefined) { - return {} + return { needSync: githubSyncVersion } } if (info.external === undefined) { // TODO: Use selected repository diff --git a/services/github/pod-github/src/sync/issues.ts b/services/github/pod-github/src/sync/issues.ts index a28f214a3b..882e1e435e 100644 --- a/services/github/pod-github/src/sync/issues.ts +++ b/services/github/pod-github/src/sync/issues.ts @@ -325,11 +325,13 @@ export class IssueSyncManager extends IssueSyncManagerBase implements DocSyncMan derivedClient: TxOperations ): Promise | undefined> { const container = await this.provider.getContainer(info.space) + if (container?.container === undefined) { + return { needSync: githubSyncVersion } + } if ( - container?.container === undefined || - ((container.project.projectNodeId === undefined || + (container.project.projectNodeId === undefined || !container.container.projectStructure.has(container.project._id)) && - syncConfig.MainProject) + syncConfig.MainProject ) { this.ctx.error('Not syncing no structure', { url: info.url }) return { needSync: '' } diff --git a/services/github/pod-github/src/sync/projects.ts b/services/github/pod-github/src/sync/projects.ts index 79f19e3c4a..6833820794 100644 --- a/services/github/pod-github/src/sync/projects.ts +++ b/services/github/pod-github/src/sync/projects.ts @@ -103,7 +103,7 @@ export class ProjectsSyncManager implements DocSyncManager { ): Promise | undefined> { const container = await this.provider.getContainer(info.space) if (container?.container === undefined) { - return {} + return { needSync: githubSyncVersion } } const okit = await this.provider.getOctokit(container.project.createdBy as Ref) diff --git a/services/github/pod-github/src/sync/pullrequests.ts b/services/github/pod-github/src/sync/pullrequests.ts index 066d73cb9a..6851996840 100644 --- a/services/github/pod-github/src/sync/pullrequests.ts +++ b/services/github/pod-github/src/sync/pullrequests.ts @@ -957,13 +957,15 @@ export class PullRequestSyncManager extends IssueSyncManagerBase implements DocS derivedClient: TxOperations ): Promise | undefined> { const container = await this.provider.getContainer(info.space) + if (container?.container === undefined) { + return { needSync: githubSyncVersion } + } if ( - container?.container === undefined || - ((container.project.projectNodeId === undefined || + (container.project.projectNodeId === undefined || !container.container.projectStructure.has(container.project._id)) && - syncConfig.MainProject) + syncConfig.MainProject ) { - return { needSync: '' } + return { needSync: githubSyncVersion } } const pullRequestExternal = info.external as unknown as PullRequestExternalData diff --git a/services/github/pod-github/src/sync/reviewComments.ts b/services/github/pod-github/src/sync/reviewComments.ts index 3cc0883bbe..7dca881622 100644 --- a/services/github/pod-github/src/sync/reviewComments.ts +++ b/services/github/pod-github/src/sync/reviewComments.ts @@ -307,7 +307,7 @@ export class ReviewCommentSyncManager implements DocSyncManager { ): Promise | undefined> { const container = await this.provider.getContainer(info.space) if (container?.container === undefined) { - return {} + return { needSync: githubSyncVersion } } if (parent === undefined) { return { needSync: githubSyncVersion } diff --git a/services/github/pod-github/src/sync/reviewThreads.ts b/services/github/pod-github/src/sync/reviewThreads.ts index 0ce7ff5c21..92c36d4ba6 100644 --- a/services/github/pod-github/src/sync/reviewThreads.ts +++ b/services/github/pod-github/src/sync/reviewThreads.ts @@ -263,7 +263,7 @@ export class ReviewThreadSyncManager implements DocSyncManager { ): Promise | undefined> { const container = await this.provider.getContainer(info.space) if (container?.container === undefined) { - return {} + return { needSync: githubSyncVersion } } if (parent === undefined) { return { needSync: githubSyncVersion } diff --git a/services/github/pod-github/src/sync/reviews.ts b/services/github/pod-github/src/sync/reviews.ts index e1d1082fcd..4e8115e3d2 100644 --- a/services/github/pod-github/src/sync/reviews.ts +++ b/services/github/pod-github/src/sync/reviews.ts @@ -281,7 +281,7 @@ export class ReviewSyncManager implements DocSyncManager { ): Promise | undefined> { const container = await this.provider.getContainer(info.space) if (container?.container === undefined) { - return {} + return { needSync: githubSyncVersion } } if (parent === undefined) { return { needSync: githubSyncVersion }