You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: extract inline scripts from all workflows into standalone testable files #755
GitHub Actions workflow YAML files should not contain inline JavaScript, Python, or PowerShell scripts. Inline scripts in workflows are:
Untestable — no way to unit test logic embedded in YAML
Hard to review — YAML + embedded code is noisy and error-prone
Hard to reuse — logic locked inside a specific workflow can't be shared
This was discovered during PR #753 review, where inline JS spam-scoring logic had to be extracted into scripts/comment-moderation.mjs with its own test file.
Proposed Convention
All workflow logic should live in standalone script files with their own tests:
Scripts go inscripts/ (or a workflow-specific subdirectory)
Tests go intest/ following existing vitest patterns
Workflows userun: node scripts/my-script.mjs instead of actions/github-script with inline code
Context is passed via environment variables (GITHUB_TOKEN, event data, etc.)
Scope
Audit all existing workflows in .github/workflows/ for inline scripts:
Activity