Skip to content
Breno A edited this page May 16, 2024 · 1 revision

PRP-Preprocessor

PRP-Preprocessor is a GitHub Action that replaces variables in files. It is written in TypeScript, and uses pnpm for package management.

Features

  • Variable Replacement: This action replaces variables in files with specified values.
  • File Filtering: It can process files with a specific extension in a specified directory.
  • Commit Changes: After processing the files, it commits the changes to the repository with a customizable commit message.

Inputs

Complete list in action.yml

  • rootDir: The root directory where the action should look for files. Default is ".".
  • extension: The extension of the files to preprocess. Default is ".prp".
  • commitMessage: The commit message to use when committing changes. Default is "chore: process {_amount_} PRP files".
  • userEmail: The user email to use for the commit. Default is "actions@github.com".
  • userName: The user name to use for the commit. Default is "CI Friends".
  • encoding: The encoding of the files to process. Default is "utf8".
  • ignoredVars: Variables to ignore during preprocessing. Default is "".
  • ignoredDirs: Directories to ignore during file search. Default is "".
  • includeSubDirs: Whether to include subdirectories during file search. Default is "true".

Development

The main function of the action is in src/main.ts. It uses the simple-git package to commit and push changes to the repository.

Contributing

Contributions are welcome! Please read the contributing guidelines before making any changes.

License

This project is licensed under the terms of the Apache 2.0 license.

Clone this wiki locally