chore(core): Expose owner information for environment changes (#16466)

Co-authored-by: Guillaume Jacquart <jacquart.guillaume@gmail.com>
This commit is contained in:
Andreas Fitzek
2025-06-20 11:33:17 +02:00
committed by GitHub
parent 37a4c4b73e
commit 57911225e7
12 changed files with 223 additions and 72 deletions

View File

@@ -42,7 +42,7 @@ import {
} from './source-control-helper.ee';
import { SourceControlImportService } from './source-control-import.service.ee';
import { SourceControlPreferencesService } from './source-control-preferences.service.ee';
import type { ExportableCredential } from './types/exportable-credential';
import type { StatusExportableCredential } from './types/exportable-credential';
import type { ExportableFolder } from './types/exportable-folders';
import type { ImportResult } from './types/import-result';
import { SourceControlContext } from './types/source-control-context';
@@ -663,6 +663,7 @@ export class SourceControlService {
conflict: false,
file: item.filename,
updatedAt: item.updatedAt ?? new Date().toISOString(),
owner: item.owner,
});
});
@@ -676,6 +677,7 @@ export class SourceControlService {
conflict: options.direction === 'push' ? false : true,
file: item.filename,
updatedAt: item.updatedAt ?? new Date().toISOString(),
owner: item.owner,
});
});
@@ -689,6 +691,7 @@ export class SourceControlService {
conflict: true,
file: item.filename,
updatedAt: item.updatedAt ?? new Date().toISOString(),
owner: item.owner,
});
});
@@ -719,11 +722,7 @@ export class SourceControlService {
);
// only compares the name, since that is the only change synced for credentials
const credModifiedInEither: Array<
ExportableCredential & {
filename: string;
}
> = [];
const credModifiedInEither: StatusExportableCredential[] = [];
credLocalIds.forEach((local) => {
const mismatchingCreds = credRemoteIds.find((remote) => {
return remote.id === local.id && (remote.name !== local.name || remote.type !== local.type);
@@ -746,6 +745,7 @@ export class SourceControlService {
conflict: false,
file: item.filename,
updatedAt: new Date().toISOString(),
owner: item.ownedBy,
});
});
@@ -759,6 +759,7 @@ export class SourceControlService {
conflict: options.direction === 'push' ? false : true,
file: item.filename,
updatedAt: new Date().toISOString(),
owner: item.ownedBy,
});
});
@@ -772,6 +773,7 @@ export class SourceControlService {
conflict: true,
file: item.filename,
updatedAt: new Date().toISOString(),
owner: item.ownedBy,
});
});
return {