2021-06-28 18:06:37 +03:00
# Contributing
2023-04-04 17:28:46 +03:00
Thank you for considering contributing to [git-cliff ](https://github.com/orhun/git-cliff )!
2021-06-28 18:06:37 +03:00
When contributing, please first discuss the change you wish to make via [issue ](https://github.com/orhun/git-cliff/issues ),
[email ](mailto:orhunparmaksiz@gmail.com ), or any other method with the owners of this repository before making a change.
Note that we have a [Code of Conduct ](./CODE_OF_CONDUCT.md ), please follow it in all your interactions with the project.
## Setup
1. Fork this repository and create your branch from `main` .
2. Clone your forked repository.
```sh
git clone https://github.com/{username}/git-cliff & & cd git-cliff
2024-10-21 23:29:39 +03:00
# OR
git clone git@github.com:{username}/git-cliff & & cd git-cliff
2021-06-28 18:06:37 +03:00
```
2024-09-14 21:58:24 +03:00
To ensure the successful execution of the tests, it is essential to fetch the tags as follows:
```sh
git fetch --tags https://github.com/orhun/git-cliff
```
2023-04-28 14:27:35 +03:00
3. Make sure that you have [Rust ](https://www.rust-lang.org/ ) `1.64.0` or later installed and build the project.
2023-04-04 17:28:46 +03:00
2021-06-28 18:06:37 +03:00
```sh
cargo build
```
4. Start committing your changes. Follow the [conventional commit specification ](https://www.conventionalcommits.org/ ) while doing so.
5. Add your tests (if you haven't already) or update the existing tests according to the changes. And check if the tests are passed.
```sh
cargo test
```
2024-04-21 22:02:41 +03:00
6. If needed, update the snapshot tests (i.e. tests using `expect_test` ):
```sh
env UPDATE_EXPECT=1 cargo test
```
7. Make sure [rustfmt ](https://github.com/rust-lang/rustfmt ) and [clippy ](https://github.com/rust-lang/rust-clippy ) don't complain about your changes.
2021-06-28 18:06:37 +03:00
2023-04-12 16:40:05 +03:00
We use the `nightly` channel for `rustfmt` so please set the appropriate settings for your editor/IDE for that.
2021-06-28 18:06:37 +03:00
## Create a Pull Request
1. Ensure that you updated the documentation and filled the [Pull Request template ](./.github/PULL_REQUEST_TEMPLATE.md ) according to the changes you made.
2. Wait for approval from the project owner/maintainer. Discuss the possible changes and update your Pull Request if necessary.
3. You may merge the Pull Request once you have the sign-off of the project owner/maintainer, or if you do not have permission to do that, you may request the project owner/maintainer to merge it in case they haven't done it after a while.
# License
2023-09-30 16:48:24 +03:00
By contributing, you agree that your contributions will be licensed under [The MIT License ](./LICENSE-MIT ) or [Apache License 2.0 ](./LICENSE-APACHE ).