Skip to content

Commit 765033a

Browse files
committed
fix: enhance contributing guidelines and README with commit message standards
1 parent 8d6f586 commit 765033a

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

CONTRIBUTING.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,23 @@ Please ensure all existing tests pass before submitting a pull request. If you a
116116

117117
## Commit Messages
118118

119-
We encourage the use of Conventional Commits for clear and consistent commit history. Examples:
119+
This project uses **Conventional Commits**, which is the foundation for our automated release process. Your commit messages are automatically parsed to determine the next version number and generate changelog notes.
120120

121-
- `feat: Add new feature for X`
122-
- `fix: Resolve bug in Y component`
123-
- `docs: Update README with Z section`
124-
- `chore: Update dependencies`
121+
Please follow this specification. The `commitlint` hook will prevent non-compliant messages.
122+
123+
### How Commit Types Affect Releases
124+
125+
- **`feat:`**: A commit of this type indicates a new feature has been added. This will trigger a **minor** version bump (e.g., `1.2.3` -> `1.3.0`).
126+
- **`fix:`**: A commit of this type indicates a bug fix. This will trigger a **patch** version bump (e.g., `1.2.3` -> `1.2.4`).
127+
- **`BREAKING CHANGE:`**: A commit that has `BREAKING CHANGE:` in its body or footer indicates a major, incompatible change. This will trigger a **major** version bump (e.g., `1.2.3` -> `2.0.0`).
128+
- **Other types** (`docs:`, `chore:`, `refactor:`, `style:`, `test:`): These commits will be included in the release notes but **will not** trigger a release on their own.
129+
130+
**Example of a breaking change commit:**
131+
```
132+
feat: remove deprecated `getUser` method
133+
134+
BREAKING CHANGE: The `getUser` method has been removed. Please use `fetchUser` instead.
135+
```
125136

126137
## License
127138

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ After creating your repository from this template, be sure to:
110110
3. **Update `CODE_OF_CONDUCT.md` and `CONTRIBUTING.md`**: Replace the `[YOUR_PROJECT_CONTACT_EMAIL]` placeholder with a valid project contact email.
111111
4. **Update `README.md` badges**: Replace `your-username/your-new-repo` in the badge URLs with your actual GitHub username and repository name.
112112
5. **Configure Publishing (Optional)**: In `.releaserc.js`, change `npmPublish: false` to `npmPublish: true` if you want to publish to the npm registry. You will also need to add an `NPM_TOKEN` secret to your repository.
113+
6. **Write Great Release Notes**: After `semantic-release` creates a new release, edit it on GitHub to add a high-level summary of the changes.
113114

114115
## Available Scripts
115116

0 commit comments

Comments
 (0)