Skip to content

Commit 721d8f7

Browse files
Copilotpelikhan
andcommitted
Add prettier formatting step after schema download
This fixes the issue where pkg/workflow/schemas/github-workflow.json was reformatted inconsistently during the build process. The upstream SchemaStore provides the schema with expanded arrays (multi-line format), while our repository uses compact arrays (single-line format). Without formatting after download, the schema would toggle between: - Expanded format after download (upstream format) - Compact format after make fmt (prettier compacts arrays) Now the download-github-actions-schema target includes prettier formatting, ensuring consistent compact array formatting regardless of upstream changes. Co-authored-by: pelikhan <[email protected]>
1 parent 335e8cb commit 721d8f7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ download-github-actions-schema:
105105
@mkdir -p pkg/workflow/schemas
106106
@curl -s -o pkg/workflow/schemas/github-workflow.json \
107107
"https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json"
108-
@echo "✓ Downloaded GitHub Actions schema to pkg/workflow/schemas/github-workflow.json"
108+
@echo "Formatting schema with prettier..."
109+
@prettier --write pkg/workflow/schemas/github-workflow.json --ignore-path /dev/null >/dev/null 2>&1
110+
@echo "✓ Downloaded and formatted GitHub Actions schema to pkg/workflow/schemas/github-workflow.json"
109111

110112
# Run linter
111113
.PHONY: golint

0 commit comments

Comments
 (0)