Contributing
Guidelines and best practices for contributing to Multiple Cucumber HTML Reporter.
We love contributions! Following these guidelines will help ensure a smooth contribution process and maintain a high-quality codebase.
Before You Start
- Search Existing Issues & Discussions: Before creating a new issue or discussion, please check the existing GitHub Issues and GitHub Discussions to prevent duplicates.
- AI Usage Policy: Using AI tools (e.g., ChatGPT, GitHub Copilot) to help write code or documentation is fine, provided that you carefully verify, test, and take ownership of all submitted changes.
- Create issue for your PR: Ensure that there is an active issue in the issues tab for your PR and the same is linked properly. If no issue is there, ensure to create one, this helps in properly tracking the PR to an active issue.
Environment & Local Setup
Prerequisites
- Node.js:
v22(Recommended / Required version) - pnpm: Our preferred package manager (
pnpm v11+)
Setting up Node JS with PNPM
# Download and install latest nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.6/install.sh | bash
# in lieu of restarting the shell
\. "$HOME/.nvm/nvm.sh"
# Download and install Node.js:
nvm install 22
# Verify the Node.js version:
node -v # Should print "v22.x.x".
# Download and install pnpm:
corepack enable pnpm
# Verify pnpm version:
pnpm -vSetting Up the Project (Forking & Cloning)
Fork the Repository
Click the Fork button at the top right of the GitHub Repository to create a copy under your GitHub account.
Clone your Fork
git clone https://github.com/YOUR-USERNAME/multiple-cucumber-html-reporter.git
cd multiple-cucumber-html-reporterAdd Upstream Remote
git remote add upstream https://github.com/WasiqB/multiple-cucumber-html-reporter.gitInstall Dependencies
pnpm installNote
Running pnpm install initializes Git pre-commit hooks via Husky.
Build the reporter
From the reporter directory in the repository, run the following command to build the reporter:
pnpm buildSetup Command line tool locally
For debugging the reporter, you need to setup the CLI tool locally by running the following commands from the root folder of the repository:
pnpm link --global ./reporter
pnpm installPre-commit Git Hooks (Linting & Formatting)
This repository uses Husky and lint-staged to run pre-commit checks automatically.
- Every time you execute
git commit,lint-stagedautomatically formats and lints your staged TypeScript and JSON files using Biome (pnpm format:fix,pnpm lint:fix). - Commit message linting (
commitlint) is also enforced on pre-commit to maintain Conventional Commit history.
Recommended IDE Setup
- Editor: We recommend using VS Code.
- Extensions: Install the Biome VS Code extension (
biomejs.biome) for consistent code formatting and linting directly inside your editor.
Project Structure
Understanding the workspace organization:
multiple-cucumber-html-reporter/
├── .github/ # GitHub Actions workflows and templates
├── docs/ # Documentation site (Fumadocs / Next.js)
│ └── content/docs/
│ ├── (beta)/ # Documentation for upcoming / unreleased beta features
│ └── latest/ # Documentation for stable releases
├── examples/ # Sample projects for debugging & manual testing
└── reporter/ # Core reporter package source codeDevelopment & Debugging
Debugging with Sample Projects
To test and debug your changes against realistic setups, utilize the sample projects in the examples/ directory:
- Build / link the core package if necessary.
- Navigate to one of the example directories under
examples/. - Run the example test scripts by running
pnpm test. - Run the command
mchrorpnpm reportto generate and view the report.
Running Test Suite
To verify your changes, run the following command from the reporter folder:
# Run unit tests
pnpm test
# Run test coverage report
pnpm unit.test.coverageUpdating GitHub Workflows
Update files under .github/workflows/ only when:
- Adding or modifying CI/CD automation steps.
- Updating matrix test configurations (e.g., Node version matrix).
- Adjusting release, lint, or test workflow triggers.
Updating Documentation
When adding new features, fixing bugs, or changing APIs, update the docs in docs/content/docs/:
docs/content/docs/(beta)/: Add or update documentation for upcoming / beta features.docs/content/docs/latest/: Update documentation applicable to current stable releases.
Building the documentation site
Run the following command from the docs folder in the repository:
pnpm buildRun the local dev server
Run the command:
pnpm devCommits & GPG Signing
Commit Message Format
We strictly follow Conventional Commits format enforced via commitlint.
Example:
feat: add support for custom execution metricsGPG Signed Commits
All commits must be GPG signed for security and verification:
- Set up a GPG key in Git following GitHub's Managing commit signature verification guide.
- Ensure commit signing is enabled:
git config --global user.signingkey <YOUR_KEY_ID>
git config --global commit.gpgsign trueSubmitting a Pull Request (PR)
Sync local branch
Sync your local main branch with upstream:
git checkout main
git fetch upstream
git merge upstream/mainCommit your changes
Make your changes, then commit with signed conventional commit messages (git commit -S -m "feat: ..."). Git pre-commit hooks will automatically lint and format staged files.
Open PR in main repository
Navigate to the main repository on GitHub and open a Pull Request from your fork's branch into WasiqB:main.
Fill out the PR template with details of the changes and link related issues.
Recognition
For contributors who wants to get recognized and get showcase on our Community page, you must have any one of the following eligibility:
- Get 3 PRs merged to
mainbranch. - Get 1 critical PR with important feature merged to
mainbranch.
Conclusion
Looking forward for your contribution to the project.
Thank you ❤️ for helping make multiple-cucumber-html-reporter better!
Last updated on