We generally follow the GitHub flow in our project. In a nutshell, this requires the following steps to contribute:
- Fork the repository (only required if you don't have write access to the repository).
- Create a feature branch.
- Make changes and create a commit
- Push your changes to GitHub and create a pull request (PR); note that we enforce a particular style for the PR titles, see below.
- Wait for maintainers to review your changes and, if necessary, revise your PR.
- When all requirements are met, a reviewer or the PR author (if they have write permissions) can merge the PR.
To ensure a consistent Git history (from which we can later easily generate changelogs automatically), we always squash commits when merging a PR and enforce that all PR titles comply with the conventional-commit format. For examples, please take a look at our commit history.
We have CI jobs running for every PR to test and lint the repository. You can install Git pre-commit hooks to ensure that these check pass even before pushing your changes to GitHub. To use this, the following steps are required:
- Install Rust.
- Install pre-commit using
pip
or your OS's package manager. - Run
pre-commit install
in the repository.
After this setup, the code will be checked, reformatted, and tested whenever you create a Git commit.
You can also use a custom pre-commit configuration if you wish:
- Create a file
.custom-pre-commit-config.yaml
(this is set to be ignored by Git).
We appreciate it if you configure Git to sign your commits.