Skip to content

Commit 75d4131

Browse files
mkleczeksteve-chavez
authored andcommitted
chore: Add commit structuring guidelines to CONTRIBUTING.md
1 parent 66f84c5 commit 75d4131

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,15 @@ Check the [development docs](https://github.com/PostgREST/postgrest/blob/main/ni
5353
### Running Tests
5454

5555
For instructions on running tests, see the [development docs](https://github.com/PostgREST/postgrest/blob/main/nix/README.md#testing).
56+
57+
### Structuring commits in pull requests
58+
59+
To simplify reviews, make it easy to split pull requests if deemed necessary, and to maintain clean and meaningful history of changes, you will be asked to update your PR if it does not follow the below rules:
60+
61+
* It must be possible to merge the PR branch into target using `git merge --ff-only`, ie. the source branch must be rebased on top of target.
62+
* No merge commits in the source branch.
63+
* All commits in the source branch must be self contained, meaning: it should be possible to treat each commit as a separate PR.
64+
* Commits in the source branch must contain only related changes (related means the changes target a single problem/goal). For example, any refactorings should be isolated from the actual change implementation into separate commits.
65+
* Tests, documentation, and changelog updates should be contained in the same commits as the actual code changes they relate to. An exception to this rule is when test or documentation changes are made in separate PR.
66+
* Commit messages must be prefixed with one of the prefixes defined in [the list used by commit verification scripts](https://github.com/PostgREST/postgrest/blob/main/nix/tools/gitTools.nix#L11).
67+
* Commit messages should contain a longer description of the purpose of the changes contained in the commit and, for non-trivial changes, a description of the changes themselves.

0 commit comments

Comments
 (0)