Skip to content

Commit a3fe276

Browse files
committed
docs(contributing.md): improve readability of contributing docs
1 parent 85a43b1 commit a3fe276

File tree

1 file changed

+76
-27
lines changed

1 file changed

+76
-27
lines changed

docs/contributing.md

+76-27
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,84 @@
11
## Contributing to commitizen
22

3-
First of all, thank you for taking the time to contribute! 🎉
3+
First, thank you for taking the time to contribute! 🎉
44

55
When contributing to [commitizen](https://github.com/commitizen-tools/commitizen), please first create an [issue](https://github.com/commitizen-tools/commitizen/issues) to discuss the change you wish to make before making a change.
66

77
If you're a first-time contributor, you can check the issues with the [good first issue](https://github.com/commitizen-tools/commitizen/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) tag.
88

9-
## Install before contributing
10-
11-
1. Install [poetry](https://python-poetry.org/) `>=2.0.0`. See the installation [pages](https://python-poetry.org/docs/#installing-with-the-official-installer).
12-
2. Install [gpg](https://gnupg.org). See the installation [pages](https://gnupg.org/documentation/manuals/gnupg/Installation.html#Installation). For Mac users, you can use [homebrew](https://brew.sh/).
13-
14-
## Before making a pull request
15-
16-
1. Fork [the repository](https://github.com/commitizen-tools/commitizen).
17-
2. Clone the repository from your GitHub.
18-
3. Set up the development environment through [poetry](https://python-poetry.org/) (`poetry install`).
19-
4. Set up the [pre-commit](https://pre-commit.com/) hook (`poetry setup-pre-commit`).
20-
5. Checkout a new branch and add your modifications.
21-
6. Add test cases for all your changes.
22-
(We use [CodeCov](https://codecov.io/) to ensure our test coverage does not drop.)
23-
7. Use [commitizen](https://github.com/commitizen-tools/commitizen) to make git commits. We follow [conventional commits](https://www.conventionalcommits.org/).
24-
8. Run `poetry all` to ensure you follow the coding style and the tests pass.
25-
9. Optionally, update the `./docs/README.md` or `docs/images/cli_help` (by running `poetry doc:screenshots`).
26-
10. **Do not** update the `CHANGELOG.md`; it will be automatically created after merging to `master`.
27-
11. **Do not** update the versions in the project; they will be automatically updated.
28-
12. If your changes are about documentation, run `poetry doc` to serve documentation locally and check whether there are any warnings or errors.
29-
13. Send a [pull request](https://github.com/commitizen-tools/commitizen/pulls) 🙏
9+
## Prerequisites & Setup
10+
11+
### Required Tools
12+
13+
1. **Python Environment**
14+
- Python `>=3.9`
15+
- [Poetry](https://python-poetry.org/docs/#installing-with-the-official-installer) `>=2.0.0`
16+
17+
2. **Version Control & Security**
18+
- Git
19+
- Commitizen
20+
- [GPG](https://gnupg.org) for commit signing
21+
- [Installation page](https://gnupg.org/documentation/manuals/gnupg/Installation.html#Installation)
22+
- For Mac users: `brew install gnupg`
23+
- For Windows users: Download from [Gpg4win](https://www.gpg4win.org/)
24+
- For Linux users: Use your distribution's package manager (e.g., `apt install gnupg` for Ubuntu)
25+
26+
### Getting Started
27+
28+
1. Fork [Commitizen](https://github.com/commitizen-tools/commitizen)
29+
2. Clone your fork:
30+
```bash
31+
git clone https://github.com/YOUR_USERNAME/commitizen.git
32+
cd commitizen
33+
```
34+
3. Add the upstream repository:
35+
```bash
36+
git remote add upstream https://github.com/commitizen-tools/commitizen.git
37+
```
38+
4. Set up the development environment:
39+
```bash
40+
poetry install
41+
```
42+
5. Set up pre-commit hooks:
43+
```bash
44+
poetry setup-pre-commit
45+
```
46+
47+
## Development Workflow
48+
49+
1. **Create a New Branch**
50+
```bash
51+
git switch -c feature/your-feature-name
52+
# or
53+
git switch -c fix/your-bug-fix
54+
```
55+
56+
2. **Make Your Changes**
57+
- Write your code
58+
- Add tests for new functionality
59+
- Update documentation if needed
60+
- Follow the existing code style
61+
62+
3. **Testing**
63+
- Run the full test suite: `poetry all`
64+
- Ensure test coverage doesn't drop (we use [CodeCov](https://codecov.io/))
65+
- For documentation changes, run `poetry doc` to check for warnings/errors
66+
67+
4. **Committing Changes**
68+
- Use commitizen to make commits (we follow [conventional commits](https://www.conventionalcommits.org/))
69+
- Example: `cz commit`
70+
71+
5. **Documentation**
72+
- Update `docs/README.md` if needed
73+
- For CLI help screenshots: `poetry doc:screenshots`
74+
- **DO NOT** update `CHANGELOG.md` (automatically generated)
75+
- **DO NOT** update version numbers (automatically handled)
76+
77+
6. **Pull Request**
78+
- Push your changes: `git push origin your-branch-name`
79+
- Create a pull request on GitHub
80+
- Ensure CI checks pass
81+
- Wait for review and address any feedback
3082
3183
## Use of GitHub Labels
3284
@@ -57,7 +109,7 @@ If you're a first-time contributor, you can check the issues with the [good firs
57109
* os: macOS
58110
59111
60-
### Issue life cycle
112+
## Issue life cycle
61113
62114
```mermaid
63115
graph TD
@@ -75,7 +127,7 @@ graph TD
75127
close --> output[/close/]
76128
```
77129
78-
### Pull request life cycle
130+
## Pull request life cycle
79131
80132
```mermaid
81133
flowchart TD
@@ -103,6 +155,3 @@ flowchart TD
103155
--modification-received-->
104156
review
105157
```
106-
107-
108-
[conventional-commits]: https://www.conventionalcommits.org/

0 commit comments

Comments
 (0)