From 42a6788a51373f490c628ee52c81ef54cbe02c6c Mon Sep 17 00:00:00 2001 From: Lee Wei Date: Fri, 5 Feb 2021 16:25:45 +0800 Subject: [PATCH] Update CONTRIBUTING.md (#128) * init contributing guide * update README Signed-off-by: Lee Co-authored-by: Charlie Jonas --- CONTIBUTING.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ README.md | 4 ++++ 2 files changed, 48 insertions(+) create mode 100644 CONTIBUTING.md diff --git a/CONTIBUTING.md b/CONTIBUTING.md new file mode 100644 index 0000000..001998d --- /dev/null +++ b/CONTIBUTING.md @@ -0,0 +1,44 @@ +# Contributing + +First off, thanks for taking the time to contribute! + +Remember that this is open source software so please consider the other people who will read your code. +Make it look nice for them, document your logic in comments and add or update the unit test cases. + +This library is used by various other projects, companies and individuals in live production environments so please discuss any breaking changes with us before making them. +Feel free to join us in the #go-ping channel of the [Gophers Slack](https://invite.slack.golangbridge.org/). + +## Pull Requests + +[Fork the repo on GitHub](https://github.com/go-ping/ping/fork) and clone it to your local machine. + +```bash +git clone https://github.com/YOUR_USERNAME/ping.git && cd ping +``` + +Here is a guide on [how to configure a remote repository](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/configuring-a-remote-for-a-fork). + +Check out a new branch, make changes, run tests, commit & sign-off, then push branch to your fork. + +```bash +$ git checkout -b +# edit files +$ make style vet test +$ git add +$ git commit -s +$ git push +``` + +Open a [new pull request](https://github.com/go-ping/ping/compare) in the main `go-ping/ping` repository. +Please describe the purpose of your PR and remember link it to any related issues. + +*We may ask you to rebase your feature branch or squash the commits in order to keep the history clean.* + +## Development Guides + +- Run `make style vet test` before committing your changes. +- Document your logic in code comments. +- Add tests for bug fixes and new features. +- Use UNIX-style (LF) line endings. +- End every file with a single blank line. +- Use the UTF-8 character set. diff --git a/README.md b/README.md index 1d999b8..8074587 100644 --- a/README.md +++ b/README.md @@ -135,3 +135,7 @@ This repo was originally in the personal account of For support and help, you usually find us in the #go-ping channel of Gophers Slack. See https://invite.slack.golangbridge.org/ for an invite to the Gophers Slack org. + +## Contributing + +Refer to [CONTRIBUTING.md](https://github.com/go-ping/ping/blob/master/CONTRIBUTING.md)