Skip to content

Commit 7fc3057

Browse files
committed
Adds some notes on commits and GitHub to CONTRIBUTING
1 parent 6caf452 commit 7fc3057

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

CONTRIBUTING.md

+30-1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,35 @@ pub struct Responder {
7272
## Test Coverage
7373
Tests should be provided to cover both positive and negative conditions. Tests should cover both the proper execution as well as all the covered error paths. PR with no proper test coverage will not be merged.
7474

75-
## Signing Commits
75+
## Git conventions
76+
77+
### Commits, titles, and descriptions
78+
79+
- Changes must be split logically in commits, such that a commit is self-contained
80+
- In general terms, all commits need to pass the test suite. There may be some exceptions to this rule if the change you are working on touches several components of the codebase and it makes more sense to split the change by component (or group of components)
81+
- Commit titles need to be short and explanatory. If we are, for instance, adding an RPC command to the backend, "Adds command X to the backend" will be a good short description, "Add command" or "Fix #123" where #123 is an issue referencing this feature **IS NOT**
82+
- Descriptions can be provided to give more context about what has been fixed and how
83+
84+
### Pull requests
85+
86+
- Pull request titles need to be explanatory, in the same way, commits titles were. If a PR includes a single commit, they can share the title, otherwise, a general title of what we are trying to achieve is required. **DO NOT REFERENCE ISSUES IN PULL REQUEST TITLES**, save that for the PR description
87+
- PR descriptions need to guide the reviewer into what has been changed. You can reference issues here. If the PR is a fix of a simple issue, "Fix #123" may suffice, however, if it involves several changes, a proper explanation of both what has been fixed and how is due. These are two good examples of PR descriptions, both long and short: [188](https://github.com/talaia-labs/rust-teos/pull/188), [194](https://github.com/talaia-labs/rust-teos/pull/194)
88+
- **WE DO NOT PILE "fix" COMMITS IN A PULL REQUEST**, that is, if some fixes are requested by reviewers, or something was missing from our original approach, it needs to be squashed. Do **NOT** do this:
89+
90+
```
91+
886b0ff Adds X functionality to component Y
92+
801ff5d Fixes the previous commit because Z
93+
67ac345 Addresses review comments
94+
7dc7fcd Updates X because G was missing
95+
b60999c Adds missing test
96+
...
97+
```
98+
99+
- Create a new branch to work on your pull request. **DO NOT** work from the master branch of your fork*
100+
- **DO NOT** merge master into your branch, rebase master instead*
101+
102+
\* If you're not sure how to handle this, check external documentation on how to manage multiple remotes for the same repository.
103+
104+
### Signing Commits
76105

77106
We require that all commits to be merged into master are signed. You can enable commit signing on GitHub by following [Signing commits](https://help.github.com/en/github/authenticating-to-github/signing-commits).

0 commit comments

Comments
 (0)