Skip to content

[WIP] Migrate CI scripts from bash to JavaScript with measurable improvements#336

Open
Copilot wants to merge 1 commit into
developfrom
copilot/migrate-ci-scripts-to-javascript
Open

[WIP] Migrate CI scripts from bash to JavaScript with measurable improvements#336
Copilot wants to merge 1 commit into
developfrom
copilot/migrate-ci-scripts-to-javascript

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 19, 2026

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.


This section details on the original issue you should resolve

<issue_title>[Build/CI] Migrate CI scripts from bash to JavaScript with specific, testable improvements</issue_title>
<issue_description>## Build/CI Summary

Expand and clarify the migration to JavaScript-based CI/automation scripts by listing the mandatory, measurable improvements and explicit outputs the team must deliver.

Specific CI Improvements

  • Replace brittle bash scripts (CI entrypoints, version sync, environment setup and teardown) with maintainable JavaScript tools.
  • Isolate all test and build scripts so they may execute in CI, local dev, or ephemeral environments (no hardcoded paths / platform assumptions).
  • Add robust error handling, clear exit codes, and detailed logging to all scripts for faster diagnosis and more actionable feedback in CI runs.
  • Ensure scripts automatically sanitise/validate all external input and escape outputs (for env, shell, and config writes).
  • Standardise Node.js script entrypoints to support cross-platform use (npx, node, or package.json scripts) and support repo-standard CLI arguments.
  • Script output (esp. build artefacts or logs) must pipe cleanly to CI consumers and commit hooks without formatting/unexpected file writes.
  • Remove dependency on system-installed Unix tools (e.g. sed/awk/grep). If tiny POSIX utility is required, use a vetted Node.js equivalent instead (document justification in code).
  • Where applicable, add dry-run and verbose flags for safe scripting/experimentation in CI or PR checks.
  • Add or update unit/integration tests so scripted steps run in parallel on supported CI runners (Windows/macOS/Linux), with output artefacts and side effects verified in repo-specific test jobs.
  • Update CI docs, CONTRIBUTING, and developer onboarding docs to point only at JS-based scripts, including usage examples and common troubleshooting.

Expected Deliverables

  • All required bash scripts replaced and removed from repo.
  • JavaScript scripts present in /scripts (or similar), following repo structure.
  • All affected CI workflow YAMLs (GitHub Actions, etc) refactored to use new scripts.
  • All scripts pass linting/format checks; tested on all supported CI runners.
  • Documentation updated and verified.
  • Sample logs and artefact outputs attached to PR or referenced in docs.
  • Change summary and rationale documented for reviewer sign-off.

Steps / Checklist

  • Replace all CI bash scripts with JavaScript tools (see above)
  • Enforce script validation (input sanitisation, contextual escaping)
  • Write/expand CI tests to validate outputs, logging, and cross-platform support
  • Refactor all affected workflows and docs to remove obsolete shell script references
  • Documentation updated (usage, troubleshooting, compatibility)
  • PR uses correct branch prefix (ci/ or build/)

Acceptance Criteria

  • All listed CI outputs delivered: scripts, docs, test coverage, logs
  • Bash scripts and workflow shims removed from all automated paths
  • All scripts linted, pass tests, and CI green on all platforms
  • Approach approved by maintainers
    </issue_description>

<agent_instructions>Process issue
</agent_instructions>

Comments on the Issue (you are @copilot in this section)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants