Remove filename check

This commit is contained in:
Sampark Sharma
2022-10-12 13:05:05 +00:00
committed by GitHub
parent af733fded0
commit d1768edd6c
+1 -5
View File
@@ -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)