mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Move tag collection into repository (no-changelog) (#6860)
* refactor(core): Move tag collection into repository * Fix tests * Address feedback * Fix missing spot
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import Container, { Service } from 'typedi';
|
||||
import path from 'path';
|
||||
import * as Db from '@/Db';
|
||||
import {
|
||||
getTagsPath,
|
||||
getTrackingInformationFromPostPushResult,
|
||||
@@ -39,6 +38,7 @@ import type { Variables } from '@db/entities/Variables';
|
||||
import type { SourceControlWorkflowVersionId } from './types/sourceControlWorkflowVersionId';
|
||||
import type { ExportableCredential } from './types/exportableCredential';
|
||||
import { InternalHooks } from '@/InternalHooks';
|
||||
import { TagRepository } from '@/databases/repositories';
|
||||
@Service()
|
||||
export class SourceControlService {
|
||||
private sshKeyName: string;
|
||||
@@ -52,6 +52,7 @@ export class SourceControlService {
|
||||
private sourceControlPreferencesService: SourceControlPreferencesService,
|
||||
private sourceControlExportService: SourceControlExportService,
|
||||
private sourceControlImportService: SourceControlImportService,
|
||||
private tagRepository: TagRepository,
|
||||
) {
|
||||
const userFolder = UserSettings.getUserN8nFolderPath();
|
||||
this.sshFolder = path.join(userFolder, SOURCE_CONTROL_SSH_FOLDER);
|
||||
@@ -682,7 +683,7 @@ export class SourceControlService {
|
||||
options: SourceControlGetStatus,
|
||||
sourceControlledFiles: SourceControlledFile[],
|
||||
) {
|
||||
const lastUpdatedTag = await Db.collections.Tag.find({
|
||||
const lastUpdatedTag = await this.tagRepository.find({
|
||||
order: { updatedAt: 'DESC' },
|
||||
take: 1,
|
||||
select: ['updatedAt'],
|
||||
|
||||
Reference in New Issue
Block a user