UBERF-8053: Github fixes (#6554)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2024-09-13 15:25:17 +05:00
committed by GitHub
parent 227c5cba56
commit 52e930cd07
12 changed files with 166 additions and 121 deletions
@@ -310,11 +310,11 @@ export class ReviewCommentSyncManager implements DocSyncManager {
return {}
}
if (parent === undefined) {
return { needSync: '' }
return { needSync: githubSyncVersion }
}
if (info.external === undefined) {
// TODO: Use selected repository
const repo = container.repository.find((it) => it._id === parent?.repository)
const repo = await this.provider.getRepositoryById(parent?.repository)
if (repo?.nodeId === undefined) {
// No need to sync if parent repository is not defined.
return { needSync: githubSyncVersion }
@@ -381,7 +381,7 @@ export class ReviewCommentSyncManager implements DocSyncManager {
account: Ref<Account>,
derivedClient: TxOperations
): Promise<void> {
const repository = container.repository.find((it) => it._id === info.repository)
const repository = await this.provider.getRepositoryById(info.repository)
if (repository === undefined) {
return
}
@@ -473,7 +473,7 @@ export class ReviewCommentSyncManager implements DocSyncManager {
derivedClient: TxOperations
): Promise<DocumentUpdate<DocSyncInfo>> {
// TODO: Use selected repository
const repo = container.repository.find((it) => it._id === parent?.repository)
const repo = await this.provider.getRepositoryById(parent?.repository)
if (repo?.nodeId === undefined) {
// No need to sync if parent repository is not defined.
return { needSync: githubSyncVersion }