From 1bb722865287973f4e166189d67c1f20009c3854 Mon Sep 17 00:00:00 2001 From: Cameron Booth Date: Tue, 19 May 2020 10:04:07 -0700 Subject: [PATCH] Report success as well for visibility --- script/validate-data/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/script/validate-data/index.ts b/script/validate-data/index.ts index 0809372..dbea113 100755 --- a/script/validate-data/index.ts +++ b/script/validate-data/index.ts @@ -3,7 +3,7 @@ import { promises as fs } from "fs"; import { safeLoad } from "js-yaml"; import { basename, extname, join } from "path"; import { Validator as validator } from "jsonschema"; -import { endGroup, error, setFailed, startGroup } from '@actions/core'; +import { endGroup, error, info, setFailed, startGroup } from '@actions/core'; interface WorkflowWithErrors { id: string; @@ -102,12 +102,14 @@ async function checkWorkflow(workflowPath: string, propertiesPath: string): Prom ) if (erroredWorkflows.length > 0) { - startGroup(`Found ${erroredWorkflows.length} workflows with errors:`); + startGroup(`😟 - Found ${erroredWorkflows.length} workflows with errors:`); erroredWorkflows.forEach(erroredWorkflow => { error(`Errors in ${erroredWorkflow.id} - ${erroredWorkflow.errors.map(e => e.toString()).join(", ")}`) }) endGroup(); setFailed(`Found ${erroredWorkflows.length} workflows with errors`); + } else { + info("🎉🤘 - Found no workflows with errors!") } } catch (e) { error(`Unhandled error while syncing workflows: ${e}`);