Skip to content

Commit 8119910

Browse files
authored
ci: block schema changes in PRs (#712)
The JSON schema is served live from the repo, so any commit to main that modifies it is effectively a release. Only the release workflow should regenerate and commit schema changes.
1 parent ee7aea2 commit 8119910

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/lint.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,20 @@ jobs:
100100
path: node_modules
101101
key: node-modules-${{ hashFiles('package-lock.json') }}
102102
- run: npm run typecheck
103+
104+
schema-check:
105+
runs-on: ubuntu-latest
106+
steps:
107+
- uses: actions/checkout@v6
108+
with:
109+
fetch-depth: 0
110+
- name: Reject schema changes outside release PRs
111+
run: |
112+
if git diff --name-only origin/main...HEAD | grep -q '^schemas/agentcore\.schema\.v[0-9]*\.json$'; then
113+
echo ""
114+
echo "❌ schemas/ must not be modified directly."
115+
echo "The JSON schema is served live from the repo — changes are released automatically."
116+
echo "Schema regeneration happens during the release workflow."
117+
exit 1
118+
fi
119+
echo "✓ No schema changes detected"

0 commit comments

Comments
 (0)