Skip to content

Latest commit

 

History

History
67 lines (41 loc) · 4.72 KB

REVIEWING.md

File metadata and controls

67 lines (41 loc) · 4.72 KB

Reviewing Guide

This document covers who may review pull requests for this project, and provides guidance on how to perform code reviews that meet our community standards and code of conduct. All reviewers must read this document and agree to follow the project review guidelines. Reviewers who do not follow these guidelines may have their privileges revoked.

The Reviewer Role

Everyone is encouraged to review code, even if they are not officially reviewer. However, only pull requests approved by maintainers can be merged.

Values

All reviewers must abide by the Code of Conduct and are also protected by it. A reviewer should not tolerate poor behavior and is encouraged to report any behavior that violates the Code of Conduct. All of our values listed above are distilled from our Code of Conduct.

Below are concrete examples of how it applies to code review specifically:

Inclusion

Be welcoming and inclusive. You should proactively ensure that the author is successful. While any particular pull request may not ultimately be merged, overall we want people to have a great experience and be willing to contribute again. Answer the questions they didn't know to ask or offer concrete help when they appear stuck.

Sustainability

Avoid burnout by enforcing healthy boundaries. Here are some examples of how a reviewer is encouraged to act to take care of themselves:

  • Authors should meet baseline expectations when submitting a pull request, such as writing tests.
  • If your availability changes, you can step down from a pull request and have someone else assigned.
  • If interactions with an author are not following the code of conduct, close the PR and raise it up with your Code of Conduct committee or point of contact. It's not your job to coax people into behaving.

Trust

Be trustworthy. During a review, your actions both build and help maintain the trust that the community has placed in this project. Below are examples of ways that we build trust:

  • Transparency - If a pull request won't be merged, clearly say why and close it. If a pull request won't be reviewed for a while, let the author know so they can set expectations and understand why it's blocked.
  • Integrity - Put the project's best interests ahead of personal relationships or company affiliations when deciding if a change should be merged.
  • Stability - Only merge when the change won't negatively impact project stability. It can be tempting to merge a pull request that doesn't meet our quality standards, for example when the review has been delayed, or because we are trying to deliver new features quickly, but regressions can significantly hurt trust in our project.

Process

  1. Do not start reviewing a pull request if it is WIP or is a draft pull request until it is marked as ready to review.
  2. Do not start reviewing a pull request if automated checks fail. Wait until they are fixed by the author.
  3. All pull requests except those generated by bots MUST have an issue associated. Motivations and designs SHOULD be discussed in the corresponding issue instead of in the pull request.
  4. Do a quick check for the license header for all new files.
  5. When you provide feedback, make it clear if the change must be made for the pull request to be approved, or if it is just a suggestion. Mark suggestions with nit.
  6. Reviews from maintainers are required. Only pull requests approved by maintainers can be merged. If the author is a maintainer, the pull request is required to be approved by other maintainers.
  7. Maintainers can merge their own pull requests after being approved by other maintainers.
  8. Pull requests are required to be reviewed again if updates come after the approval from maintainers.

Checklist

Below are a set of common questions that apply to all pull requests:

  • Is this PR targeting the correct branch?
  • Does the commit message provide an adequate description of the change?
  • Does the affected code have corresponding tests?
  • Are the changes well documented and recognizable by godoc?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Has this PR passed the CI?

Reading List

Reviewers are encouraged to read the following articles for help with common reviewer tasks: