Skip to content

Commit a0c9aa6

Browse files
committed
chore: M5 CI/Workflow Sweep - add blockers and contractile.just
1 parent 8bc8861 commit a0c9aa6

2 files changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
name: NPM/Bun Blocker
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
check:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
steps:
14+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
15+
- name: Block npm/bun
16+
run: |
17+
if [ -f "package-lock.json" ] || [ -f "bun.lockb" ] || [ -f ".npmrc" ]; then
18+
echo "❌ npm/bun artifacts detected. Use Deno instead."
19+
exit 1
20+
fi
21+
echo "✅ No npm/bun violations"

.github/workflows/ts-blocker.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
name: TypeScript/JavaScript Blocker
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
check:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
steps:
14+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
15+
- name: Block new TypeScript/JavaScript
16+
run: |
17+
NEW_TS=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E '\.(ts|tsx)$' | grep -v '\.gen\.' || true)
18+
NEW_JS=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E '\.(js|jsx)$' | grep -v '\.res\.js$' | grep -v '\.gen\.' | grep -v 'node_modules' || true)
19+
20+
if [ -n "$NEW_TS" ] || [ -n "$NEW_JS" ]; then
21+
echo "❌ New TS/JS files detected. Use ReScript instead."
22+
[ -n "$NEW_TS" ] && echo "$NEW_TS"
23+
[ -n "$NEW_JS" ] && echo "$NEW_JS"
24+
exit 1
25+
fi
26+
echo "✅ ReScript policy enforced"

0 commit comments

Comments
 (0)