From 6346cc50e425e200d704e9f61d2e6b3fb803232a Mon Sep 17 00:00:00 2001 From: regexowl Date: Thu, 21 Dec 2023 14:14:49 +0100 Subject: [PATCH] workflows: Add check for manual changes to API This adds a check to ensure that the code generated automatically by `npm run api` has no manual changes. --- .github/workflows/dev-checks.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/dev-checks.yml b/.github/workflows/dev-checks.yml index b4462815..d3a0075a 100644 --- a/.github/workflows/dev-checks.yml +++ b/.github/workflows/dev-checks.yml @@ -21,6 +21,8 @@ jobs: cache: 'npm' - name: Install dependencies run: npm ci + - name: Check for manual changes to API + run: npm run api && [ -z "$(git status --porcelain=v1 2>/dev/null)" ] && echo "✓ No manual API changes." || echo "✗ API manually changed, please refer to the README for the procedure to follow for programmatically generated API endpoints." && [ -z "$(git status --porcelain=v1 2>/dev/null)" ] - name: Run build run: npm run build - name: Run lint check