First off, thank you for considering contributing to setup-solr-action 🎉. Contributions, issues, and feature requests are welcome!
- Fork this repository.
- Clone your fork locally:
git clone https://github.com/dhavalgojiya/setup-solr-action.git
cd setup-solr-action-
Use the supported Node.js version (currently Node.js 24). This project pins the required Node.js version in
.nvmrc(this is the Node.js runtime version, not npm or nvm). If you use nvm, just run the following inside the project directory to switch to the correct Node.js version:nvm use
💡 If Node.js 24 isn't installed yet, just run
nvm install— it reads.nvmrc, installs the correct Node.js version, and switches to it automatically. -
Install project dependencies:
npm install
This will set up all required packages defined in
package-lock.jsonfor development.
We use Biome for linting and formatting, along with shfmt for shell scripts.
-
Run linting & formatting checks:
npm run check
This will automatically apply fixes for formatting/lint issues across the project.
-
Format shell scripts (in
src/scripts/):npm run format:sh
We use prek to run our Git hooks. prek is a drop-in
replacement for pre-commit that reuses the same
.pre-commit-config.yaml. Unlike pre-commit (written
in Python), prek is written in Rust and ships as a single dependency-free binary
for faster, simpler installs.
-
Install prek:
uv tool install prek # or: brew install prek -
Enable the hooks in your local clone:
prek install
The hooks now run automatically on every
git commit. -
Run all hooks against the whole repository manually:
prek run --all-files
The same hooks run in CI, so running them locally helps you catch issues before pushing.
We use tsup to bundle the action.
This compiles the source code into a distributable format inside the dist/ folder.
-
Run build:
npm run build
After running this, the final output can be found in
dist/.
For convenience, you can run everything (install → lint → format → build) with a single command:
npm run allThis ensures your environment is clean and ready for contribution.
You can simulate the GitHub Action locally using nektos/act:
npm run actThis will run the action in a local environment, useful before pushing changes.
- Create a new branch from
mainfor your work (don’t work directly onmain):
git checkout -b feature/add-xyz
git checkout -b fix/solr-port-issue
git checkout -b docs/improve-readmeBranch names should follow the format:
>feature/...→ new features
>fix/...→ bug fixes
>docs/...→ documentation updates
-
Make your changes and commit with a clear message.
We follow the Conventional Commits format:
type(scope): short description, wherescopeis optional.git commit -m "fix: correct Solr port mapping issue" git commit -m "feat(solr): add support for custom Solr cores"
-
Push your branch to your fork:
git push origin feature/add-xyz
-
Open a Pull Request (PR) against the
mainbranch of this repository.In the PR description:
- Link the related issue using
Fixes #<issue_number>(if applicable). - Explain what your PR changes or adds.
- If it’s a new feature, provide usage examples.
- If possible, add/update tests to cover your changes.
- Link the related issue using
- Follow existing coding style and formatting.
- Keep commits clean and meaningful.
- Update documentation (README, comments) if you change behavior.
- Pull requests should be small and focused.
Every contribution counts! Whether it's fixing a typo, improving documentation, or suggesting a new feature — we appreciate your efforts 💙.