diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8559e0136..420be26b1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,13 +1,33 @@ # Contributing to Ginkgo -Your contributions to Ginkgo are essential for its long-term maintenance and improvement. To make a contribution: +Your contributions to Ginkgo are essential for its long-term maintenance and improvement. - Please **open an issue first** - describe what problem you are trying to solve and give the community a forum for input and feedback ahead of investing time in writing code! - Ensure adequate test coverage: - - If you're adding functionality to the Ginkgo library, make sure to add appropriate unit and/or integration tests (under the `integration` folder). - - If you're adding functionality to the Ginkgo CLI note that there are very few unit tests. Please add an integration test. - - Please run all tests locally (`ginkgo -r -p`) and make sure they go green before submitting the PR - - Please run following linter locally `go vet ./...` and make sure output does not contain any warnings -- Update the documentation. In addition to standard `godoc` comments Ginkgo has extensive documentation on the `gh-pages` branch. If relevant, please submit a docs PR to that branch alongside your code PR. + - When adding to the Ginkgo library, add unit and/or integration tests (under the `integration` folder). + - When adding to the Ginkgo CLI, note that there are very few unit tests. Please add an integration test. +- Update the documentation. Ginko uses `godoc` comments and documentation on the `gh-pages` branch. + If relevant, please submit a docs PR to that branch alongside your code PR. Thanks for supporting Ginkgo! + +## Setup + +Fork the repo, then: + +``` +go get https://github.com/onsi/ginkgo +go get github.com/onsi/gomega/... +cd $GOPATH/onsi/ginkgo +git remote add fork git@github.com:/ginkgo.git + +ginkgo -r -p # ensure tests are green +go vet ./... # ensure linter is happy +``` + +## Making the PR + - go to a new branch `git checkout -b my-feature` + - make your changes + - run tests and linter again (see above) + - `git push fork` + - open PR 🎉 diff --git a/README.md b/README.md index e1e781454..cdf8d054a 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,4 @@ Ginkgo is MIT-Licensed ## Contributing -Since Ginkgo tests also internal packages, when you fork, you'll have to replace imports with your repository.
-Use `before_pr.sh` for that
-After you finished your changes and before you push your pull request, use `after_pr.sh` to revert those changes +See [CONTRIBUTING.md](CONTRIBUTING.md) diff --git a/before_pr.sh b/before_pr.sh deleted file mode 100755 index 3cf262f38..000000000 --- a/before_pr.sh +++ /dev/null @@ -1,13 +0,0 @@ -# Take current path -path=$(pwd) - -# Split it -IFS='\/'; arrIN=($path); unset IFS; - -# Find directory before ginkgo -len=${#arrIN[@]} - -userDir=${arrIN[$len-2]} - -# Replace onsi with userdir -find . -type f -name '*.go' -exec sed -i '' s/github.com\\/onsi\\/ginkgo\\/internal/github.com\\/$userDir\\/ginkgo\\/internal/ {} + \ No newline at end of file