From 8d0e63fc3e4830f91f56edacfc2f6345dd9e20f0 Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Wed, 4 Dec 2019 20:44:38 +0100 Subject: [PATCH] Merge PR #209: update PR template --- .codecov.yml | 19 +++++--- .github/PULL_REQUEST_TEMPLATE.md | 36 ++++++++++----- .github/staly.yml | 44 ++++++++++++++++++ CONTRIBUTING.md | 77 +++++++++++++++++--------------- 4 files changed, 122 insertions(+), 54 deletions(-) create mode 100644 .github/staly.yml diff --git a/.codecov.yml b/.codecov.yml index 7321557b..758acd48 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -1,4 +1,3 @@ - # # This codecov.yml is the default configuration for # all repositories on Codecov. You may adjust the settings @@ -10,17 +9,25 @@ coverage: range: 70...100 status: - # Learn more at https://codecov.io/docs#yaml_default_commit_status - project: + # Learn more at https://docs.codecov.io/docs/commit-status + project: default: threshold: 1% # allow this much decrease on project + app: + target: 80% + paths: "app/" + changes: false comment: - layout: "header, diff" - behavior: default # update if exists else create new + layout: "reach, diff, files" + behavior: default # update if exists else create new + require_changes: true ignore: - - "docs" - "*.md" - "*.rst" + - "cmd/" + - "contrib/" + - "docs/" + - "networks/" diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0f6760e8..4806195f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,20 +1,34 @@ -- Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/gaia/blob/master/CONTRIBUTING.md#pr-targeting)) +Closes: #XXX -- [ ] Linked to github-issue with discussion and accepted design OR link to spec that describes this work. -- [ ] Wrote tests -- [ ] Updated relevant documentation (`docs/`) -- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md` -- [ ] Reviewed `Files changed` in the github PR explorer +## Description + + ______ -For Admin Use: -- Added appropriate labels to PR (ex. wip, ready-for-review, docs) -- Reviewers Assigned -- Squashed all commits, uses message "Merge PR #XYZ: [title]" ([coding standards](https://github.com/tendermint/coding/blob/master/README.md#merging-a-pr)) +For contributor use: + +- [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/gaia/blob/master/CONTRIBUTING.md#pr-targeting)) +- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. +- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md). +- [ ] Wrote unit and integration [tests](https://github.com/cosmos/gaia/blob/master/CONTRIBUTING.md#testing) +- [ ] Updated relevant documentation (`docs/`) or specification (`x//spec/`) +- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code). +- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md` +- [ ] Re-reviewed `Files changed` in the Github PR explorer + +______ + +For admin use: + +- [ ] Added appropriate labels to PR (ex. `WIP`, `R4R`, `docs`, etc) +- [ ] Reviewers assigned +- [ ] Squashed all commits, uses message "Merge pull request #XYZ: [title]" ([coding standards](https://github.com/tendermint/coding/blob/master/README.md#merging-a-pr)) \ No newline at end of file diff --git a/.github/staly.yml b/.github/staly.yml new file mode 100644 index 00000000..d750bf77 --- /dev/null +++ b/.github/staly.yml @@ -0,0 +1,44 @@ +# Configuration for probot-stale - https://github.com/probot/stale + +# Number of days of inactivity before an Issue or Pull Request becomes stale +daysUntilStale: 10 + +# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. +# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. +daysUntilClose: 4 + +# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) +onlyLabels: [] + +# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable +exemptLabels: + - pinned + - security + +# Set to true to ignore issues in a project (defaults to false) +exemptProjects: true + +# Set to true to ignore issues in a milestone (defaults to false) +exemptMilestones: true + +# Label to use when marking as stale +staleLabel: stale + +# Comment to post when marking as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Limit the number of actions per hour, from 1-30. Default is 30 +limitPerRun: 30 + +# Limit to only `issues` or `pulls` +only: pulls + +# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': +pulls: + daysUntilStale: 30 + markComment: > + This pull request has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 26b787a9..fc9d2c4d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,11 +53,12 @@ overall information on repository workflow and standards. Note, we use `make tools` for installing the linting tools. Other notes: - - Looking for a good place to start contributing? How about checking out some - [good first issues](https://github.com/cosmos/gaia/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) - - Please make sure to use `gofmt` before every commit - the easiest way to do - this is have your editor run it for you upon saving a file. Additionally - please ensure that your code is lint compliant by running `make lint` + +- Looking for a good place to start contributing? How about checking out some + [good first issues](https://github.com/cosmos/gaia/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) +- Please make sure to use `gofmt` before every commit - the easiest way to do + this is have your editor run it for you upon saving a file. Additionally + please ensure that your code is lint compliant by running `make lint` ## Pull Requests @@ -84,7 +85,7 @@ All PRs require two Reviews before merge (except docs changes, or variable name- If you open a PR in Gaia, it is mandatory to update the relevant documentation in /docs. -* If your changes relate specifically to the gaia application, please modify the docs/ folder. +- If your changes relate specifically to the gaia application, please modify the docs/ folder. ## Forking @@ -92,14 +93,14 @@ Please note that Go requires code to live under absolute paths, which complicate While my fork lives at `https://github.com/rigeyrigerige/gaia`, the code should never exist at `$GOPATH/src/github.com/rigeyrigerige/gaia`. Instead, we use `git remote` to add the fork as a new remote for the original repo, -`$GOPATH/src/github.com/cosmos/gaia `, and do all the work there. +`$GOPATH/src/github.com/cosmos/gaia`, and do all the work there. For instance, to create a fork and work on a branch of it, I would: - - Create the fork on github, using the fork button. - - Go to the original repo checked out locally (i.e. `$GOPATH/src/github.com/cosmos/gaia`) - - `git remote rename origin upstream` - - `git remote add origin git@github.com:rigeyrigerige/gaia.git` +- Create the fork on github, using the fork button. +- Go to the original repo checked out locally (i.e. `$GOPATH/src/github.com/cosmos/gaia`) +- `git remote rename origin upstream` +- `git remote add origin git@github.com:rigeyrigerige/gaia.git` Now `origin` refers to my fork and `upstream` refers to the Gaia version. So I can `git push -u origin master` to update my fork, and make pull requests to Gaia from there. @@ -107,8 +108,8 @@ Of course, replace `rigeyrigerige` with your git handle. To pull in updates from the origin repo, run - - `git fetch upstream` - - `git rebase upstream/master` (or whatever branch you want) +- `git fetch upstream` +- `git rebase upstream/master` (or whatever branch you want) Please don't make Pull Requests to `master`. @@ -152,13 +153,13 @@ for tcIndex, tc := range cases { for i := 0; i < tc.numTxsToTest; i++ { - require.Equal(t, expectedTx[:32], calculatedTx[:32], - "First 32 bytes of the txs differed. tc #%d, i #%d", tcIndex, i) + require.Equal(t, expectedTx[:32], calculatedTx[:32], + "First 32 bytes of the txs differed. tc #%d, i #%d", tcIndex, i) ``` ## Branching Model and Release -User-facing repos should adhere to the trunk based development branching model: https://trunkbaseddevelopment.com/. +User-facing repos should adhere to the [trunk based development branching model](https://trunkbaseddevelopment.com/). Libraries need not follow the model strictly, but would be wise to. @@ -173,17 +174,19 @@ should be targeted against the release candidate branch. Release candidate branc only pull requests targeted directly against master. ### Development Procedure - - the latest state of development is on `master` - - `master` must never fail `make test` or `make test_cli` - - `master` should not fail `make lint` - - no `--force` onto `master` (except when reverting a broken commit, which should seldom happen) - - create a development branch either on github.com/cosmos/gaia, or your fork (using `git remote add origin`) - - before submitting a pull request, begin `git rebase` on top of `master` + +- the latest state of development is on `master` +- `master` must never fail `make test` or `make test_cli` +- `master` should not fail `make lint` +- no `--force` onto `master` (except when reverting a broken commit, which should seldom happen) +- create a development branch either on github.com/cosmos/gaia, or your fork (using `git remote add origin`) +- before submitting a pull request, begin `git rebase` on top of `master` ### Pull Merge Procedure - - ensure pull branch is rebased on `master` - - run `make test` and `make test_cli` to ensure that all tests pass - - merge pull request + +- ensure pull branch is rebased on `master` +- run `make test` and `make test_cli` to ensure that all tests pass +- merge pull request ### Release Procedure @@ -206,15 +209,15 @@ only pull requests targeted directly against master. At the moment, only a single major release will be supported, so all point releases will be based off of that release. - - start on `vX.XX.X` - - checkout a new branch `pre-rc/vX.X.X` - - cherry pick the desired changes from `master` - - these changes should be small and NON-BREAKING (both API and state machine) - - add entries to CHANGELOG.md and remove corresponding pending log entries - - checkout a new branch `rc/vX.X.X` based off of `vX.XX.X` - - create a PR merging `pre-rc/vX.X.X` into `rc/vX.X.X` - - run tests and simulations (noted in [Release Procedure](#release-procedure)) - - after tests and simulation have successfully completed, create the release branch `release/vX.XX.X` from the `RC` branch - - delete the `pre-rc/vX.X.X` and `RC` branches - - create a PR into `master` containing ONLY the CHANGELOG.md updates - - tag and release `release/vX.XX.X` +- start on `vX.XX.X` +- checkout a new branch `pre-rc/vX.X.X` +- cherry pick the desired changes from `master` + - these changes should be small and NON-BREAKING (both API and state machine) +- add entries to CHANGELOG.md and remove corresponding pending log entries +- checkout a new branch `rc/vX.X.X` based off of `vX.XX.X` +- create a PR merging `pre-rc/vX.X.X` into `rc/vX.X.X` +- run tests and simulations (noted in [Release Procedure](#release-procedure)) +- after tests and simulation have successfully completed, create the release branch `release/vX.XX.X` from the `RC` branch +- delete the `pre-rc/vX.X.X` and `RC` branches +- create a PR into `master` containing ONLY the CHANGELOG.md updates +- tag and release `release/vX.XX.X` \ No newline at end of file