Repository navigation
chore(Item 11 tail): resolve 10 stale .md (keep canonical .adoc) + 2 .md→.adoc conversions #458
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-License-Identifier: PMPL-1.0-or-later | |
| name: TypeScript / JavaScript / ReScript Blocker | |
| on: [push, pull_request] | |
| permissions: | |
| contents: read | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Block new TypeScript / JavaScript / ReScript | |
| run: | | |
| # Estate language policy: RS/TS/JS -> AffineScript -> typed-wasm. | |
| # ReScript (.res) is also banned now that AffineScript is the destination | |
| # — no longer used as the TS replacement. | |
| NEW_TS=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E '\.(ts|tsx)$' | grep -v '\.gen\.' || true) | |
| NEW_JS=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E '\.(js|jsx)$' | grep -v '\.gen\.' | grep -v 'node_modules' || true) | |
| NEW_RES=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E '\.res$' || true) | |
| if [ -n "$NEW_TS" ] || [ -n "$NEW_JS" ] || [ -n "$NEW_RES" ]; then | |
| echo "❌ New TS/JS/ReScript files detected. Use AffineScript instead." | |
| [ -n "$NEW_TS" ] && echo "$NEW_TS" | |
| [ -n "$NEW_JS" ] && echo "$NEW_JS" | |
| [ -n "$NEW_RES" ] && echo "$NEW_RES" | |
| exit 1 | |
| fi | |
| echo "✅ AffineScript policy enforced" |