Contributing
Contributing to commitizen¶
First of all, thank you for taking the time to contribute! 🎉
When contributing to commitizen, please first create an issue to discuss the change you wish to make before making a change.
If you're a first-time contributor, you can check the issues with good first issue tag.
Install before contributing¶
- Install poetry
1.2.0+
, installation pages - Install gpg, installation pages. For Mac users, you could try homebrew.
Before making a pull request¶
- Fork the repository.
- Clone the repository from your GitHub.
- Setup development environment through poetry (
poetry install
). - Setup pre-commit hook (
poetry run pre-commit install
) - Check out a new branch and add your modification.
- Add test cases for all your changes. (We use CodeCov to ensure our test coverage does not drop.)
- Use commitizen to do git commit. We follow conventional commits.
- Run
./scripts/format
and./scripts/test
to ensure you follow the coding style and the tests pass. - Optionally, update the
./docs/README.md
. - Do not update the
CHANGELOG.md
, it will be automatically created after merging tomaster
. - Do not update the versions in the project, they will be automatically updated.
- If your changes are about documentation. Run
poetry run mkdocs serve
to serve documentation locally and check whether there is any warning or error. - Send a pull request 🙏
Use of GitHub Labels¶
- good-first-issue (issue only)
- help-wanted
- issue-status: needs-triage (issue only) (default label for issues)
- issue-status: wont-fix
- issue-status: wont-implement
- issue-status: duplicate
- issue-status: invalid
- issue-status: wait-for-response
- issue-status: wait-for-implementation
- issue-status: pr-created
- pr-status: wait-for-review (default label for PRs)
- pr-status: reviewing
- pr-status: wait-for-modification
- pr-status: wait-for-response
- pr-status: ready-to-merge
- needs: test-case (pr only)
- needs: documentation (pr only)
- type: feature
- type: bug
- type: documentation
- type: refactor
- type: question (issue only)
- os: Windows
- os: Linux
- os: macOS
Issue life cycle¶
graph TD
input[/issue created/] -->
needs-triage
needs-triage --triage--> close(wont-implement, wont-fix, duplicate, invalid)
needs-triage --triage--> wait-for-implementation
needs-triage --triage--> wait-for-response
wait-for-response --response--> needs-triage
wait-for-implementation --PR-created--> pr-created --PR-merged--> output[/close/]
close --> output[/close/]
Pull request life cycle¶
flowchart TD
input[/pull request created/] -->
wait-for-review
--start reviewing -->
reviewing
--finish review -->
reviewed{approved}
reviewed --Y-->
wait-for-merge -->
output[/merge/]
reviewed --n-->
require-more-information{require more information}
require-more-information --y-->
wait-for-response
--response-->
require-more-information
require-more-information --n-->
wait-for-modification
--modification-received-->
review