From b498c1ee6a52c6dbf358bb08d968e06cb80a21cf Mon Sep 17 00:00:00 2001 From: ryanchrypto <12519942+ryanchrypto@users.noreply.github.com> Date: Mon, 7 Jun 2021 11:49:35 -0700 Subject: [PATCH 1/3] docs: update contributing --- CONTRIBUTING.md | 51 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a630e871de51..a11775fa4fb7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,7 +34,7 @@ contributors, the general procedure for contributing has been established: 3. If nobody has been assigned for the issue and you would like to work on it, make a comment on the issue to inform the community of your intentions to begin work - 4. Follow standard Github best practices: fork the repo, branch from the + 4. Follow standard GitHub best practices: fork the repo, branch from the HEAD of `master`, make some commits, and submit a PR to `master` - For core developers working within the cosmos-sdk repo, to ensure a clear ownership of branches, branches must be named with the convention @@ -49,7 +49,7 @@ contributors, the general procedure for contributing has been established: Note that for very small or blatantly obvious problems (such as typos) it is not required to an open issue to submit a PR, but be aware that for more complex problems/features, if a PR is opened before an adequate design discussion has -taken place in a github issue, that PR runs a high likelihood of being rejected. +taken place in a GitHub issue, that PR runs a high likelihood of being rejected. Other notes: @@ -57,7 +57,7 @@ Other notes: [good first issues](https://github.com/cosmos/cosmos-sdk/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) - Please make sure to run `make format` 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 `golangci-lint run`. + please ensure that your code is lint compliant by running `make lint-fix`. A convenience git `pre-commit` hook that runs the formatters automatically before each commit is available in the `contrib/githooks/` directory. @@ -66,20 +66,39 @@ Other notes: When proposing an architecture decision for the SDK, please create an [ADR](./docs/architecture/README.md) so further discussions can be made. We are following this process so all involved parties are in agreement before any party begins coding the proposed implementation. If you would like to see some examples -of how these are written refer to the current [ADRs](https://github.com/cosmos/cosmos-sdk/tree/master/docs/architecture) +of how these are written refer to the current [ADRs](https://github.com/cosmos/cosmos-sdk/tree/master/docs/architecture). ## Pull Requests -To accommodate review process we suggest that PRs are categorically broken up. -Ideally each PR addresses only a single issue. Additionally, as much as possible -code refactoring and cleanup should be submitted as a separate PRs from bugfixes/feature-additions. +PRs should be categorically broken up based on the type of changes being made (i.e. `fix`, `feat`, +`refactor`, `docs`, etc.). The *type* must be included in the PR title as a prefix (e.g. +`fix: `). This ensures that all changes committed to the base branch follow the +[Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. +Additionally, each PR should only address a single issue. -### Process for reviewing PRs +### Pull Request Templates -All PRs require two Reviews before merge (except docs changes, or variable name-changes which only require one). When reviewing PRs please use the following review explanations: +There are currently three PR templates. The [default template](./.github/PULL_REQUEST_TEMPLATE.md) is for types `fix`, `feat`, and `refactor`. We also have a [docs template](./.github/PULL_REQUEST_TEMPLATE/docs.md) for documentation changes and an [other template](./.github/PULL_REQUEST_TEMPLATE/other.md) for changes that do not affect production code. When previewing a PR before it has been opened, you can change the template by adding one of the following parameters to the url: +- `template=docs.md` +- `template=other.md` + +### Requesting Reviews + +In order to accomodate the review process, the author of the PR must complete the author checklist +to the best of their abilities before marking the PR as "Ready for Review". If you would like to +receive early feedback on the PR, open the PR as a "Draft" and leave a comment in the PR indicating +that you would like early feedback. + +### Reviewing Pull Requests + +All PRs require at least two reviews before they can be merged (one review might be acceptable in +the case of minor changes to [docs](./.github/PULL_REQUEST_TEMPLATE/docs.md) or [other](./.github/PULL_REQUEST_TEMPLATE/other.md) changes that do not affect production code). Each PR template has a +reviewers checklist that must be completed before the PR can be merged. Each reviewer is responsible +for all checked items unless they have indicated otherwise by leaving their handle next to specific items. +In addition, please use the following review explanations: - `LGTM` without an explicit approval means that the changes look good, but you haven't pulled down the code, run tests locally and thoroughly reviewed it. -- `Approval` through the GH UI means that you understand the code, documentation/spec is updated in the right places, you have pulled down and tested the code locally. In addition: +- `Approval` means that you have completed some or all of the reviewer checklist items (i.e. reviewed state machine logic, reviewed API design and naming, reviewed documentation is accurate, etc.). If you only reviewed selected items, you have added your handle next to the items that you have reviewed. In addition: - You must also think through anything which ought to be included but is not - You must think through whether any added code could be partially combined (DRYed) with existing code - You must think through any potential security issues or incentive-compatibility flaws introduced by the changes @@ -91,7 +110,7 @@ All PRs require two Reviews before merge (except docs changes, or variable name- ### Updating Documentation -If you open a PR on the Cosmos SDK, it is mandatory to update the relevant documentation in /docs. +If you open a PR on the Cosmos SDK, it is mandatory to update the relevant documentation in `/docs`. - If your change relates to the core SDK (baseapp, store, ...), please update the `docs/basics/`, `docs/core/` and/or `docs/building-modules/` folders. - If your changes relate to the core of the CLI or Light-client (not specifically to module's CLI/Rest), please modify the `docs/interfaces/` folder. @@ -109,7 +128,7 @@ Instead, we use `git remote` to add the fork as a new remote for the original re For instance, to create a fork and work on a branch of it, I would: -- Create the fork on github, using the fork button. +- Create the fork on GitHub, using the fork button. - Go to the original repo checked out locally (i.e. `$GOPATH/src/github.com/cosmos/cosmos-sdk`) - `git remote rename origin upstream` - `git remote add origin git@github.com:rigeyrigerige/cosmos-sdk.git` @@ -232,14 +251,14 @@ should be targeted against the release candidate branch. - **no PRs targeting this branch should be merged unless exceptional circumstances arise** - On the `RC` branch, prepare a new version section in the `CHANGELOG.md` - All links must be link-ified: `$ python ./scripts/linkify_changelog.py CHANGELOG.md` - - Copy the entries into a `RELEASE_CHANGELOG.md`, this is needed so the bot knows which entries to add to the release page on github. + - Copy the entries into a `RELEASE_CHANGELOG.md`, this is needed so the bot knows which entries to add to the release page on GitHub. - Kick off a large round of simulation testing (e.g. 400 seeds for 2k blocks) - If errors are found during the simulation testing, commit the fixes to `master` and create a new `RC` branch (making sure to increment the `rcN`) - After simulation has successfully completed, create the release branch (`release/vX.XX.X`) from the `RC` branch - Create a PR to `master` to incorporate the `CHANGELOG.md` updates -- Tag the release (use `git tag -a`) and create a release in Github +- Tag the release (use `git tag -a`) and create a release in GitHub - Delete the `RC` branches ### Point Release Procedure @@ -294,7 +313,7 @@ to developers who show an aptitude towards developing with this code base. Several different kinds of privileges may be granted however most common privileges to be granted are merge rights to either part of, or the entirety of the -code base (through the github `CODEOWNERS` file). The on-boarding process for +code base (through the GitHub `CODEOWNERS` file). The on-boarding process for new code owners is as follows: On a bi-monthly basis (or more frequently if agreeable) all the existing code owners will privately convene to discuss potential new candidates as well as the potential for existing code-owners to @@ -373,7 +392,7 @@ of the **Concept Approval Committee**. Members must: -* Participate in all or almost all ADR discussions, both on Github as well as in bi-weekly Architecture Review +* Participate in all or almost all ADR discussions, both on GitHub as well as in bi-weekly Architecture Review meetings * Be active contributors to the SDK, and furthermore should be continuously making substantial contributions to the project's codebase, review process, documentation and ADRs From d90c6cbe96f6e4ca77fcb10b22b984edbb403acf Mon Sep 17 00:00:00 2001 From: ryanchrypto <12519942+ryanchrypto@users.noreply.github.com> Date: Tue, 8 Jun 2021 09:58:14 -0700 Subject: [PATCH 2/3] docs: update contributing --- CONTRIBUTING.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a11775fa4fb7..d7b38d1caf13 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,7 +3,9 @@ - [Contributing](#contributing) - [Architecture Decision Records (ADR)](#architecture-decision-records-adr) - [Pull Requests](#pull-requests) - - [Process for reviewing PRs](#process-for-reviewing-prs) + - [Pull Request Templates](#pull-request-templates) + - [Requesting Reviews](#requesting-reviews) + - [Reviewing Pull Requests](#reviewing-pull-requests) - [Updating Documentation](#updating-documentation) - [Forking](#forking) - [Dependencies](#dependencies) @@ -87,24 +89,24 @@ There are currently three PR templates. The [default template](./.github/PULL_RE In order to accomodate the review process, the author of the PR must complete the author checklist to the best of their abilities before marking the PR as "Ready for Review". If you would like to receive early feedback on the PR, open the PR as a "Draft" and leave a comment in the PR indicating -that you would like early feedback. +that you would like early feedback and tagging whoever you would like to receive feedback from. ### Reviewing Pull Requests All PRs require at least two reviews before they can be merged (one review might be acceptable in the case of minor changes to [docs](./.github/PULL_REQUEST_TEMPLATE/docs.md) or [other](./.github/PULL_REQUEST_TEMPLATE/other.md) changes that do not affect production code). Each PR template has a reviewers checklist that must be completed before the PR can be merged. Each reviewer is responsible -for all checked items unless they have indicated otherwise by leaving their handle next to specific items. -In addition, please use the following review explanations: +for all checked items unless they have indicated otherwise by leaving their handle next to specific +items. In addition, please use the following review explanations: -- `LGTM` without an explicit approval means that the changes look good, but you haven't pulled down the code, run tests locally and thoroughly reviewed it. -- `Approval` means that you have completed some or all of the reviewer checklist items (i.e. reviewed state machine logic, reviewed API design and naming, reviewed documentation is accurate, etc.). If you only reviewed selected items, you have added your handle next to the items that you have reviewed. In addition: +- `LGTM` without an explicit approval means that the changes look good, but you haven't thoroughly reviewed the reviewer checklist items. +- `Approval` means that you have completed some or all of the reviewer checklist items. If you only reviewed selected items, you have added your handle next to the items that you have reviewed. In addition, please follow these guidelines: - You must also think through anything which ought to be included but is not - You must think through whether any added code could be partially combined (DRYed) with existing code - You must think through any potential security issues or incentive-compatibility flaws introduced by the changes - Naming must be consistent with conventions and the rest of the codebase - Code must live in a reasonable location, considering dependency structures (e.g. not importing testing modules in production code, or including example code modules in production code). - - if you approve of the PR, you are responsible for fixing any of the issues mentioned here and more + - If you approve of the PR, you are responsible for fixing any of the issues mentioned here and in the reviewer checklist. - If you sat down with the PR submitter and did a pairing review please note that in the `Approval`, or your PR comments. - If you are only making "surface level" reviews, submit any notes as `Comments` without adding a review. From b0807ef3f1a64ca5c5d1c2f45735ebae530b9565 Mon Sep 17 00:00:00 2001 From: ryanchrypto <12519942+ryanchrypto@users.noreply.github.com> Date: Tue, 8 Jun 2021 10:20:31 -0700 Subject: [PATCH 3/3] docs: update contributing --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d7b38d1caf13..0a5d974a1abd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -106,7 +106,7 @@ items. In addition, please use the following review explanations: - You must think through any potential security issues or incentive-compatibility flaws introduced by the changes - Naming must be consistent with conventions and the rest of the codebase - Code must live in a reasonable location, considering dependency structures (e.g. not importing testing modules in production code, or including example code modules in production code). - - If you approve of the PR, you are responsible for fixing any of the issues mentioned here and in the reviewer checklist. + - If you approve of the PR, you are responsible for any issues mentioned here and any issues that should have been addressed after thoroughly reviewing the reviewer checklist items in the pull request template. - If you sat down with the PR submitter and did a pairing review please note that in the `Approval`, or your PR comments. - If you are only making "surface level" reviews, submit any notes as `Comments` without adding a review.