Skip to content

Latest commit

 

History

History
102 lines (64 loc) · 2.77 KB

File metadata and controls

102 lines (64 loc) · 2.77 KB

Contributing

Thank you for considering contributing to git-cliff!

When contributing, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Note that we have a Code of Conduct, please follow it in all your interactions with the project.


Required Tooling

  • Install the nightly toolchain (required for rustfmt):
rustup toolchain install nightly
  • Optional: set up editor/IDE integration to use nightly rustfmt for this repository.

Setup

  1. Fork this repository and create your branch from main.

  2. Clone your forked repository.

git clone https://github.com/{username}/git-cliff && cd git-cliff
# OR
git clone git@github.com:{username}/git-cliff && cd git-cliff
  1. Fetch tags (required for tests):
git fetch --tags https://github.com/orhun/git-cliff
  1. Install Rust 1.85.1 or later and build the project:
cargo build

Note

  • The project uses stable Rust for builds and tests.
  • Formatting and linting are run with the nightly toolchain in CI due to the use of unstable rustfmt options. Contributors are expected to run the same checks locally.

Development Workflow

  1. Start committing your changes. Follow the Conventional Commits specification.

  2. Add your tests (if you haven't already) or update the existing tests according to the changes. And check if the tests are passed:

cargo test
  1. If you changed snapshot tests (i.e. expect_test), update snapshots:
env UPDATE_EXPECT=1 cargo test
  1. Run CI checks locally - clippy (warnings are errors)
cargo clippy --tests --verbose -- -D warnings
  1. Run formatting checks – rustfmt
cargo +nightly fmt --all -- --check --verbose

If formatting fails, please run:

cargo +nightly fmt --all

Create a Pull Request

  1. Ensure that you updated the documentation and filled the Pull Request template 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

By contributing, you agree that your contributions will be licensed under The MIT License or Apache License 2.0.