Skip to content

Commit ef2ea46

Browse files
committed
docs: update docs to enforce conventional commits in pr titles
Since the repository uses squash merge, PR titles become commit messages. This change updates documentation to require PR titles to follow Conventional Commit format, ensuring proper semantic versioning and changelog generation. - Updated pull request template to emphasize Conventional Commits for PR titles - Added PR title format guidance to CONTRIBUTING.md - Clarified in release cheatsheet that PR titles must follow Conventional Commit format due to squash merging
1 parent 60bc2af commit ef2ea46

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

.github/pull_request_template.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@ If you haven't already, please read [CONTRIBUTING](https://github.com/nervosnetw
55
66
If you're unsure about anything, just ask; somebody should be along to answer within a day or two.
77
8-
PR Title Format:
9-
1. module [, module2, module3]: what's changed
10-
2. *: what's changed
11-
-->
8+
**Important**: We use Squash Merge to merge PRs, so the PR title will become the commit message.
9+
Please ensure your PR title follows the [Conventional Commit Messages](https://www.conventionalcommits.org/) format.
10+
11+
The most important prefixes you should use:
1212
13+
- `fix:`: represents bug fixes, and results in a SemVer patch bump.
14+
- `feat:`: represents a new feature, and results in a SemVer minor bump.
15+
- `<prefix>!:` (e.g. `feat!:`): represents a breaking change (indicated by the !) and results in a SemVer major bump.
16+
17+
Other conventional prefixes are also acceptable (e.g., `docs:`, `refactor:`, `test:`, `chore:`, etc.).
18+
-->
1319
### What problem does this PR solve?
1420

1521
Issue Number: close #xxx <!-- REMOVE this line if no issue to close -->
@@ -40,12 +46,3 @@ Side effects
4046

4147
- Performance regression
4248
- Breaking backward compatibility
43-
44-
### Release note <!-- Choose from None, Title Only and Note. Bugfixes or new features need a release note. -->
45-
46-
```release-note
47-
None: Exclude this PR from the release note.
48-
Title Only: Include only the PR title in the release note.
49-
Note: Add a note under the PR title in the release note.
50-
```
51-

CONTRIBUTING.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Contributing
22

3-
43
When contributing to this repository, please first discuss the change you wish to make via issue,
54
email, or any other method with the community before making a change. The developer Discord channel
65
([English] | [Chinese]) should be used to discuss complicated or controversial changes before working on a patch.
@@ -27,6 +26,12 @@ Please note we have a code of conduct, please follow it in all your interactions
2726

2827
* See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
2928

29+
* **PR Title Format**: Since we use **Squash Merge** to merge PRs, the PR title will become the commit message. Please ensure your PR title follows the Conventional Commit Messages format:
30+
- `fix:`: for bug fixes
31+
- `feat:`: for new features
32+
- `<prefix>!:` (e.g. `feat!:`): for breaking changes
33+
- Other conventional prefixes are also acceptable (e.g., `docs:`, `refactor:`, `test:`, etc.)
34+
3035
* Open a new GitHub pull request with the patch.
3136

3237
* Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.

devtools/release/release-cheatsheet.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ The most important prefixes you should have in mind are:
3535

3636
Commits that don't follow the Conventional Commit format result in a SemVer patch bump.
3737

38+
**Note**: Since we use Squash Merge to merge PRs, the PR title will become the commit message. Therefore, the Conventional Commit Messages rule applies to PR titles as well. Please ensure your PR titles follow the Conventional Commit format.
39+
3840
### Important Notes
3941

4042
⚠️ **Breaking Changes**: Release-plz may not catch all breaking changes automatically. Manual version bumping is appreciated when you know a change is breaking.

0 commit comments

Comments
 (0)