Skip to content

build(deps): bump actions/github-script from 7.0.1 to 8.0.0 #43

build(deps): bump actions/github-script from 7.0.1 to 8.0.0

build(deps): bump actions/github-script from 7.0.1 to 8.0.0 #43

Workflow file for this run

# SPDX-License-Identifier: PMPL-1.0
name: TypeScript/JavaScript Blocker
on: [push, pull_request]
permissions: read-all
jobs:
check:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Block new TypeScript/JavaScript
run: |
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 '\.res\.js$' | grep -v '\.gen\.' | grep -v 'node_modules' || true)
if [ -n "$NEW_TS" ] || [ -n "$NEW_JS" ]; then
echo "❌ New TS/JS files detected. Use ReScript instead."
[ -n "$NEW_TS" ] && echo "$NEW_TS"
[ -n "$NEW_JS" ] && echo "$NEW_JS"
exit 1
fi
echo "✅ ReScript policy enforced"