mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-25 13:52:24 +02:00
UBERF-8053: Github fixes (#6554)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -12,8 +12,8 @@ import core, {
|
||||
Ref,
|
||||
TxOperations
|
||||
} from '@hcengineering/core'
|
||||
import { LiveQuery } from '@hcengineering/query'
|
||||
import github, { DocSyncInfo, GithubIntegrationRepository, GithubProject } from '@hcengineering/github'
|
||||
import { LiveQuery } from '@hcengineering/query'
|
||||
import { deepEqual } from 'fast-equals'
|
||||
import {
|
||||
ContainerFocus,
|
||||
@@ -252,7 +252,7 @@ export class CommentSyncManager implements DocSyncManager {
|
||||
}
|
||||
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 }
|
||||
@@ -303,7 +303,7 @@ export class CommentSyncManager implements DocSyncManager {
|
||||
comment: CommentExternalData,
|
||||
account: Ref<Account>
|
||||
): Promise<void> {
|
||||
const repository = container.repository.find((it) => it._id === info.repository)
|
||||
const repository = await this.provider.getRepositoryById(info.repository)
|
||||
if (repository === undefined) {
|
||||
return
|
||||
}
|
||||
@@ -384,7 +384,7 @@ export class CommentSyncManager 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 }
|
||||
|
||||
Reference in New Issue
Block a user