From be1b7f67d3f02fe9d100f31b61c5222220e4dccb Mon Sep 17 00:00:00 2001 From: bep Date: Mon, 6 Apr 2015 15:11:48 +0200 Subject: [PATCH] Add git commit message guideline Also rearranged the contribution section to get more attention to the important stuff. --- README.md | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 6d0d3636c..38539996f 100644 --- a/README.md +++ b/README.md @@ -90,10 +90,18 @@ We welcome contributions to Hugo of any kind including documentation, themes, or If you have any questions about how to contribute or what to contribute please ask on the [forum](http://discuss.gohugo.io) +## Code Contribution Guideline -## Code Contribution Guide +We welcome your contributions. To make the process as seamless as possible, we ask for the following: + +* Go ahead and fork the project and make your changes. We encourage pull requests to discuss code changes. +* When you’re ready to create a pull request, be sure to: + * Have test cases for the new code. If you have questions about how to do it, please ask in your pull request. + * Run `go fmt` + * Squash your commits into a single commit. `git rebase -i`. It’s okay to force update your pull request. + * This [blog article](http://chris.beams.io/posts/git-commit/) is a good resource for learning how to write good commit messages, the most important part being that each commit message should have a title/subject in imperative mode without trailing period: *"Return error on wrong use of the Paginator"*, **NOT** *"Returning some error."* Also, if your commit references one or more GitHub issues, always end your commit message body with *See #1234* or *Fixes #1234*. Replace *1234* with the GitHub issue ID. The last example will close the issue when the commit is merged into *master*. + * Make sure `go test ./...` passes, and `go build` completes. Our [Travis CI loop](https://travis-ci.org/spf13/hugo) will catch most things that are missing. The exception: Windows. We run on Windows from time to time, but if you have access, please check on a Windows machine too. -Contributors should build Hugo and test their changes before submitting a code change. ### Building Hugo with Your Changes @@ -137,17 +145,6 @@ Alternatively, just run `make` — all the “magic” above is already in t go install github.com/spf13/hugo/hugolib go run main.go -## Contribution Guidelines - -We welcome your contributions. To make the process as seamless as possible, we ask for the following: - -* Go ahead and fork the project and make your changes. We encourage pull requests to discuss code changes. -* When you’re ready to create a pull request, be sure to: - * Have test cases for the new code. If you have questions about how to do it, please ask in your pull request. - * Run `go fmt` - * Squash your commits into a single commit. `git rebase -i`. It’s okay to force update your pull request. - * Make sure `go test ./...` passes, and `go build` completes. Our [Travis CI loop](https://travis-ci.org/spf13/hugo) will catch most things that are missing. The exception: Windows. We run on Windows from time to time, but if you have access, please check on a Windows machine too. - **Complete documentation is available at [Hugo Documentation](http://gohugo.io/).** [![Analytics](https://ga-beacon.appspot.com/UA-7131036-6/hugo/readme)](https://github.com/igrigorik/ga-beacon)