From 595b0dda1947ae17c69a218d86c43e0661df2048 Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Wed, 5 Jun 2019 11:26:07 +0200 Subject: [PATCH] docs: add commit message guidelines Closes #683 --- CONTRIBUTING.md | 108 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 103 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 44a5e57..3fde461 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -Welcome, it is great that you found your way here. In order to make the best of all our time, we have gathered some notes +Welcome, it is great that you found your way here. In order to make the best of all our time, we have gathered some notes below which we think can be helpful when contributing to this project. ## Getting Started @@ -22,13 +22,15 @@ Please start by reviewing this file. ## General Guidelines - PRs require code owner approval to merge. - Please scope PRs to areas in which you have expertise. This code is still close to research. +- Please follow our commit guideline described below. - Welcome contribution areas might include: - SNARKs - Proof-of-replication - Rust improvements - Optimizations - Documentation (expertise would require careful reading of the code) - + + ## PR Merge Policy (Git topology) ### Allowed (white list) @@ -41,7 +43,7 @@ Please start by reviewing this file. - Merge commits whose internal history contains merge commits (except in rare circumstances). - Multiple fast-forward merge commits for a single PR. - Internal junk commits — (e.g. strings of WIP). - + ### In Practice - In general, please rebase PRs before merging. - To avoid having approvals dismissed by rebasing, authors may instead choose to: @@ -52,7 +54,7 @@ If automated conflict resolution is not possible, you will need to rebase and se ## Resources for learning Rust -- Beginners +- Beginners - [The Rust Book](https://doc.rust-lang.org/book/) - [Rust Playground](https://play.rust-lang.org/) - [Rust Docs](https://doc.rust-lang.org/) @@ -63,6 +65,102 @@ If automated conflict resolution is not possible, you will need to rebase and se - How to safely write unsafe Rust: [The Rustonomicon](https://doc.rust-lang.org/nomicon/) - Did someone say macros? [The Little Book of Rust Macros](https://danielkeep.github.io/tlborm/book/index.html) + +## Commit Message Guidelines + +We have very precise rules over how our git commit messages can be formatted. This leads to **more +readable messages** that are easy to follow when looking through the **project history**. But also, +we use the git commit messages to **generate the change log programmatically**. + +### Commit Message Format + +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special +format that includes a **type**, a **scope** and a **subject**: + +``` +(): + + + +