mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-22 04:12:23 +02:00
UBERF-10471: Fix Github miss status updates and allow to re-integrate existing repos (#8842)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -370,12 +370,13 @@ export async function syncDerivedDocuments<T extends { url: string }> (
|
||||
})
|
||||
} else {
|
||||
processed.add(existing._id)
|
||||
if (!deepEqual(existing.external, r)) {
|
||||
if (!deepEqual(existing.external, r) || existing.repository !== repo._id) {
|
||||
// Only update if had changes.
|
||||
await derivedClient.update(existing, {
|
||||
external: r,
|
||||
needSync: '', // We need to check if we had any changes.
|
||||
derivedVersion: '',
|
||||
repository: repo._id,
|
||||
externalVersion: githubExternalSyncVersion,
|
||||
lastModified: new Date(r.updatedAt ?? r.createdAt).getTime(),
|
||||
...extra
|
||||
|
||||
Reference in New Issue
Block a user