diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 00000000..8e65e36a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,18 @@ +--- +name: "\U0001F41B Bug Report" +labels: "bug" +about: Something isn't working as expected + +--- + +## Bug Report + +Please answer these questions before submitting your issue. Thanks! + +1. What did you do? If possible, provide a recipe for reproducing the error. + +2. What did you expect to see? + +3. What did you see instead? + +4. Versions of the `nano` diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 00000000..45e38b9d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,20 @@ +--- +name: "\U0001F680 Feature Request" +labels: "feature-request" +about: I have a suggestion + +--- + +## Feature Request + +**Is your feature request related to a problem? Please describe:** + + +**Describe the feature you'd like:** + + +**Describe alternatives you've considered:** + + +**Teachability, Documentation, Adoption, Optimization:** + \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 00000000..c55d0a57 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,14 @@ +--- +name: "\U0001F914 Question" +labels: "question" +about: Usage question that isn't answered in docs or discussion + +--- + +## Question + +Before asking a question, make sure you have: + +- Searched existing Stack Overflow questions. +- Googled your question. +- Searched open and closed [GitHub issues](https://github.com/lonng/nano/issues?q=is%3Aissue) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..84af8240 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,30 @@ + + +### What problem does this PR solve? + + +### What is changed and how it works? + + +### Check List + +Tests + + - Unit test + - Integration test + - Manual test (add detailed scripts or steps below) + - No code + +Side effects + + - Possible performance regression + - Increased code complexity + - Breaking backward compatibility + +Related changes + + - Need to cherry-pick to the release branch + - Need to update the documentation + - Need to be included in the release note \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..47e873d7 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,94 @@ +# How to contribute + +This document outlines some of the conventions on development workflow, commit +message formatting, contact points and other resources to make it easier to get +your contribution accepted. + +## Getting started + +- Fork the repository on GitHub. +- Read the README.md for build instructions. +- Play with the project, submit bugs, submit patches! + +## Building Nano + +Developing Nano requires: + +* [Go 1.12](http://golang.org/doc/code.html) +* An internet connection to download the dependencies + +Simply run `make` to build the program. + +```sh +make +``` + +### Running tests + +This project contains unit tests and integration tests with coverage collection. +See [tests/README.md](./tests/README.md) for how to execute and add tests. + +### Updating dependencies + +Failpoint manages dependencies using [Go module](https://github.com/golang/go/wiki/Modules). +To add or update a dependency, either + +* Use the `go mod edit` command to change the dependency, or +* Edit `go.mod` and then run `make update` to update the checksum. + +## Contribution flow + +This is a rough outline of what a contributor's workflow looks like: + +- Create a topic branch from where you want to base your work. This is usually `master`. +- Make commits of logical units and add test case if the change fixes a bug or adds new functionality. +- Run tests and make sure all the tests are passed. +- Make sure your commit messages are in the proper format (see below). +- Push your changes to a topic branch in your fork of the repository. +- Submit a pull request. +- Your PR must receive LGTMs from two maintainers. + +Thanks for your contributions! + +### Code style + +The coding style suggested by the Golang community is used in `failpoint`. +See the [style doc](https://github.com/golang/go/wiki/CodeReviewComments) for details. + +Please follow this style to makeg `failpoint` easy to review, maintain and develop. + +### Format of the Commit Message + +We follow a rough convention for commit messages that is designed to answer two +questions: what changed and why. The subject line should feature the what and +the body of the commit should describe the why. + +``` +restore: add comment for variable declaration + +Improve documentation. +``` + +The format can be described more formally as follows: + +``` +: + + + +