Remove filename check
This commit is contained in:
@@ -44,7 +44,6 @@ const propertiesSchema = {
|
||||
async function checkWorkflows(folders: string[], allowed_categories: object[]): Promise<WorkflowWithErrors[]> {
|
||||
const result: WorkflowWithErrors[] = []
|
||||
const workflow_template_names = new Set()
|
||||
const workflow_template_file_names = new Set()
|
||||
for (const folder of folders) {
|
||||
const dir = await fs.readdir(folder, {
|
||||
withFileTypes: true,
|
||||
@@ -59,10 +58,7 @@ async function checkWorkflows(folders: string[], allowed_categories: object[]):
|
||||
|
||||
const workflowWithErrors = await checkWorkflow(workflowFilePath, propertiesFilePath, allowed_categories);
|
||||
if(workflowWithErrors.name && workflow_template_names.size == workflow_template_names.add(workflowWithErrors.name).size) {
|
||||
workflowWithErrors.errors.push(`Workflow template name "${workflowWithErrors.name}" already exists`)
|
||||
}
|
||||
if(workflow_template_file_names.size == workflow_template_file_names.add(e.name).size) {
|
||||
workflowWithErrors.errors.push(`Workflow template with filename "${e.name}" already exists`)
|
||||
workflowWithErrors.errors.push(`Workflow template name "${workflowWithErrors.name}" already exists`)
|
||||
}
|
||||
if (workflowWithErrors.errors.length > 0) {
|
||||
result.push(workflowWithErrors)
|
||||
|
||||
Reference in New Issue
Block a user