From 17ab38502df33d8bc29bed5cfca8bfd5dd117cbb Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 21 Sep 2018 18:17:32 +0100 Subject: [PATCH] Revamp issue and PR templates and CONTRIBUTING guide Thanks to @fd0 of the restic project for a very useful blog post and something to plagiarise :-) https://restic.net/blog/2018-09-09/GitHub-issue-templates --- .github/ISSUE_TEMPLATE.md | 31 ++++++++++++++++ .../ISSUE_TEMPLATE/Bug.md | 25 ++++++++----- .github/ISSUE_TEMPLATE/Feature.md | 36 +++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 29 +++++++++++++++ CONTRIBUTING.md | 29 ++++++++------- 5 files changed, 129 insertions(+), 21 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE.md rename ISSUE_TEMPLATE.md => .github/ISSUE_TEMPLATE/Bug.md (63%) create mode 100644 .github/ISSUE_TEMPLATE/Feature.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 000000000..98cf1780d --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,31 @@ + + + +#### Output of `rclone version` + + + +#### Describe the issue + + + diff --git a/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE/Bug.md similarity index 63% rename from ISSUE_TEMPLATE.md rename to .github/ISSUE_TEMPLATE/Bug.md index 9336d75b3..cf17d3d7f 100644 --- a/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE/Bug.md @@ -1,14 +1,17 @@ +--- +name: Bug report +about: Report a problem with rclone +--- + + + +#### What is your current rclone version (output from `rclone version`)? + + + +#### What problem are you are trying to solve? + + + +#### How do you think rclone should be changed to solve that? + + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..7281582f2 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,29 @@ + + +#### What is the purpose of this change? + + + +#### Was the change discussed in an issue or in the forum before? + + + +#### Checklist + +- [ ] I have read the [contribution guidelines](https://github.com/ncw/rclone/blob/master/CONTRIBUTING.md#submitting-a-pull-request). +- [ ] I have added tests for all changes in this PR if appropriate. +- [ ] I have added documentation for the changes if appropriate. +- [ ] All commit messages are in [house style](https://github.com/ncw/rclone/blob/master/CONTRIBUTING.md#commit-messages). +- [ ] I'm done, this Pull Request is ready for review :-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4f3a34b00..776de2c21 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -64,10 +64,11 @@ packages which you can install with Make sure you - * Add documentation for a new feature (see below for where) - * Add unit tests for a new feature + * Add [documentation](#writing-documentation) for a new feature. + * Follow the [commit message guidelines](#commit-messages). + * Add [unit tests](#testing) for a new feature * squash commits down to one per feature - * rebase to master `git rebase master` + * rebase to master with `git rebase master` When you are done with that @@ -203,14 +204,20 @@ file. ## Commit messages ## Please make the first line of your commit message a summary of the -change, and prefix it with the directory of the change followed by a -colon. The changelog gets made by looking at just these first lines -so make it good! +change that a user (not a developer) of rclone would like to read, and +prefix it with the directory of the change followed by a colon. The +changelog gets made by looking at just these first lines so make it +good! If you have more to say about the commit, then enter a blank line and carry on the description. Remember to say why the change was needed - the commit itself shows what was changed. +Writing more is better than less. Comparing the behaviour before the +change to that after the change is very useful. Imagine you are +writing to yourself in 12 months time when you've forgotten everything +about what you just did and you need to get up to speed quickly. + If the change fixes an issue then write `Fixes #1234` in the commit message. This can be on the subject line if it will fit. If you don't want to close the associated issue just put `#1234` and the @@ -258,9 +265,8 @@ To add a dependency `github.com/ncw/new_dependency` see the instructions below. These will fetch the dependency, add it to `go.mod` and `go.sum` and vendor it for older go versions. - export GO111MODULE=on - go get github.com/ncw/new_dependency - go mod vendor + GO111MODULE=on go get github.com/ncw/new_dependency + GO111MODULE=on go mod vendor You can add constraints on that package when doing `go get` (see the go docs linked above), but don't unless you really need to. @@ -275,9 +281,8 @@ in `vendor`. If you need to update a dependency then run - export GO111MODULE=on - go get -u github.com/pkg/errors - go mod vendor + GO111MODULE=on go get -u github.com/pkg/errors + GO111MODULE=on go mod vendor Check in in a single commit as above.