|
| 1 | +# Contributing Guidelines |
| 2 | + |
| 3 | +source{d} go-git project is [Apache 2.0 licensed](LICENSE) and accepts |
| 4 | +contributions via GitHub pull requests. This document outlines some of the |
| 5 | +conventions on development workflow, commit message formatting, contact points, |
| 6 | +and other resources to make it easier to get your contribution accepted. |
| 7 | + |
| 8 | +## Certificate of Origin |
| 9 | + |
| 10 | +By contributing to this project you agree to the [Developer Certificate of |
| 11 | +Origin (DCO)](DCO). This document was created by the Linux Kernel community and is a |
| 12 | +simple statement that you, as a contributor, have the legal right to make the |
| 13 | +contribution. |
| 14 | + |
| 15 | +In order to show your agreement with the DCO you should include at the end of commit message, |
| 16 | +the following line: `Signed-off-by: John Doe <[email protected]>`, using your real name. |
| 17 | + |
| 18 | +This can be done easily using the [`-s`](https://github.com/git/git/blob/b2c150d3aa82f6583b9aadfecc5f8fa1c74aca09/Documentation/git-commit.txt#L154-L161) flag on the `git commit`. |
| 19 | + |
| 20 | +## Support Channels |
| 21 | + |
| 22 | +The official support channels, for both users and contributors, are: |
| 23 | + |
| 24 | +- GitHub [issues](https://github.com/src-d/go-git/issues)* |
| 25 | +- Slack: #go-git room in the [source{d} Slack](https://join.slack.com/t/sourced-community/shared_invite/enQtMjc4Njk5MzEyNzM2LTFjNzY4NjEwZGEwMzRiNTM4MzRlMzQ4MmIzZjkwZmZlM2NjODUxZmJjNDI1OTcxNDAyMmZlNmFjODZlNTg0YWM) |
| 26 | + |
| 27 | +*Before opening a new issue or submitting a new pull request, it's helpful to |
| 28 | +search the project - it's likely that another user has already reported the |
| 29 | +issue you're facing, or it's a known issue that we're already aware of. |
| 30 | + |
| 31 | + |
| 32 | +## How to Contribute |
| 33 | + |
| 34 | +Pull Requests (PRs) are the main and exclusive way to contribute to the official go-git project. |
| 35 | +In order for a PR to be accepted it needs to pass a list of requirements: |
| 36 | + |
| 37 | +- You should be able to run the same query using `git`. We don't accept features that are not implemented in the official git implementation. |
| 38 | +- The expected behavior must match the [official git implementation](https://github.com/git/git). |
| 39 | +- The actual behavior must be correctly explained with natural language and providing a minimum working example in Go that reproduces it. |
| 40 | +- All PRs must be written in idiomatic Go, formatted according to [gofmt](https://golang.org/cmd/gofmt/), and without any warnings from [go lint](https://github.com/golang/lint) nor [go vet](https://golang.org/cmd/vet/). |
| 41 | +- They should in general include tests, and those shall pass. |
| 42 | +- If the PR is a bug fix, it has to include a suite of unit tests for the new functionality. |
| 43 | +- If the PR is a new feature, it has to come with a suite of unit tests, that tests the new functionality. |
| 44 | +- In any case, all the PRs have to pass the personal evaluation of at least one of the [maintainers](MAINTAINERS) of go-git. |
| 45 | + |
| 46 | +### Format of the commit message |
| 47 | + |
| 48 | +Every commit message should describe what was changed, under which context and, if applicable, the GitHub issue it relates to: |
| 49 | + |
| 50 | +``` |
| 51 | +plumbing: packp, Skip argument validations for unknown capabilities. Fixes #623 |
| 52 | +``` |
| 53 | + |
| 54 | +The format can be described more formally as follows: |
| 55 | + |
| 56 | +``` |
| 57 | +<package>: <subpackage>, <what changed>. [Fixes #<issue-number>] |
| 58 | +``` |
0 commit comments