GitHub Action that maps a key to a value using regex pattern matching. Used in CI/CD workflows to remap variables (e.g., branch names to environment names).
src/main.ts- Core logic: input validation, regex matching, output exportsrc/index.ts- Entrypoint (callsrun())action.yml- GitHub Action definition (inputs/outputs)__tests__/main.test.ts- Jest tests with mocked@actions/coredist/- Compiled bundle (generated byncc, committed to repo)
npm test- Run tests (Jest)npm run lint- Run all linters (eslint + markdownlint + yamllint)npm run format:write- Format with Prettiernpm run package- Bundle with ncc to dist/npm run all- Format + lint + test + coverage + package
Ignore generated/compiled code when exploring:
dist/- ncc bundle outputnode_modules/coverage/badges/