|
| 1 | +# GitHub Action: Text Variables |
| 2 | + |
| 3 | +This is a JavaScript-based GitHub Action that replaces mustache-style variables |
| 4 | +(`{{ variable }}`) in text templates. The action is designed to enable dynamic |
| 5 | +content creation for GitHub workflows, particularly for customizing Issue/PR |
| 6 | +descriptions, comments, and other text content. |
| 7 | + |
| 8 | +## Code Standards |
| 9 | + |
| 10 | +### Required Before Each Commit |
| 11 | + |
| 12 | +- Run `npm run format:write` to format code with Prettier |
| 13 | +- Run `npm run lint` to check code with ESLint |
| 14 | +- Run `npm run test` to execute all tests |
| 15 | +- Run `npm run all` to run the complete validation pipeline (format, lint, test, |
| 16 | + coverage, package) |
| 17 | + |
| 18 | +## Repository Structure |
| 19 | + |
| 20 | +- `src/`: Core JavaScript source code |
| 21 | + - `index.js`: Entry point for the action |
| 22 | + - `main.js`: Main logic for template processing and variable replacement |
| 23 | +- `__tests__/`: Jest test files and sample templates |
| 24 | +- `action.yml`: GitHub Action metadata and input/output definitions |
| 25 | +- `dist/`: Compiled/bundled output (generated, do not edit directly) |
| 26 | + |
| 27 | +## Code Quality |
| 28 | + |
| 29 | +1. Follow JavaScript best practices and Node.js conventions |
| 30 | +1. Use async/await for asynchronous operations |
| 31 | +1. Write comprehensive Jest tests for unit testing. |
| 32 | +1. Write integration tests for end-to-end validation of the GitHub Action using |
| 33 | + workflows in `.github/workflows/ci.yml` |
| 34 | +1. Use descriptive variable names and add comments for complex logic |
0 commit comments