# Contributing Guide - [Contributing Guide](#contributing-guide) - [Issue Reporting Guidelines](#issue-reporting-guidelines) - [Pull Request Guidelines](#pull-request-guidelines) - [Work Step Example](#work-step-example) - [Development Setup](#development-setup) - [Commonly used NPM scripts](#commonly-used-npm-scripts) - [Release](#release) ## Issue Reporting Guidelines - The issue list of this repo is **exclusively** for bug reports and feature requests. Non-conforming issues will be closed immediately. - Try to search for your issue, it may have already been answered or even fixed in the main branch. - Check if the issue is reproducible with the latest stable version of `gunshi`. If you are using a pre-release, please indicate the specific version you are using. - It is **required** that you clearly describe the steps necessary to reproduce the issue you are running into. Issues with no clear repro steps will not be triaged. If an issue labeled `status: need more repro codes or info` receives no further input from the issue author for more than 5 days, it will be closed. - For bugs that involves build setups, you can create a reproduction repository with steps in the README. - If your issue is resolved but still open, don’t hesitate to close it. In case you found a solution by yourself, it could be helpful to explain how you fixed it. ## Pull Request Guidelines - Checkout a topic branch from the `main` branch. - It's OK to have multiple small commits as you work on the PR - we will let GitHub automatically squash it before merging. - If adding new feature: - Provide convincing reason to add this feature. Ideally you should open a suggestion issue first and have it greenlighted before working on it. - If fixing a bug: - Provide detailed description of the bug in the PR. ### Work Step Example - Create your topic branch from `master`: `git branch my-new-topic origin/main` - Add codes and pass lint! - Commit your changes: `git commit -am 'Add some topic'` - Push to the branch: `git push origin my-new-topic` - Submit a pull request to `main` branch of `kazupon/gunshi` repository ! ## Development Setup After cloning the repo, run: ```sh pnpm install ``` ### Commonly used NPM scripts ```sh # lint source codes pnpm lint # code format and lint fix pnpm fix ``` There are some other scripts available in the `scripts` section of the `package.json` file. **Please make sure to have this pass successfully before submitting a PR.** Although the lint will be run against your PR on the CI server, it is better to have it working locally beforehand. ## Release Bump versions, write `CHANGELOG.md` from GitHub-generated notes, then commit, tag, and push. Run on a clean `main` whose `HEAD` is already on `origin`. Provide a token with Contents: write: ```sh GH_TOKEN="$(gh auth token)" pnpm release ``` Do not leave unrelated tracked changes: bumpp commits every tracked dirty file (`all: true`). `CHANGELOG.md` must already be tracked. The future tag must not exist locally or remotely. `pnpm release` generates changelog notes for the current `HEAD` (the commit before the release commit). GitHub Actions then publishes the packages to npm from the tag and creates the GitHub Release. It does not rewrite or commit `CHANGELOG.md`. If GitHub Release creation fails after publish, re-run the Release workflow with `job=release-notes` and the existing tag. The `"changelog"` script (`gh-changelogen --repo=kazupon/gunshi`) is published-release mode for manual recovery and requires `--tag`. ## Notes For internal notes on build configuration, dependency bundling decisions, and other non-obvious context, see [NOTES.md](./NOTES.md).