PowerShell/docs/dev-process/pull-request-process.md
joeyaiello c15eb54fa1 first pass of governance doc
still need to do a considerable rewrite of other
contributor docs in order to change terminology
to align with governance.md
2016-08-09 16:42:51 -07:00

3 KiB

Pull Request Process

author: Hemant

Hemant: "SLAs" for pull requests ALWAYS point to documents when critiquing PRs this should also include the blackbox of Windows/STEX testing time can totally be wishy-washy here "some tests we can only run internally" exact timeline not need for Aug17 Windows quality gates

Minimum gates (TODO)

Our pull request template includes the bare minimum requirements for a pull request to be accepted into PowerShell. This includes:

  • Writing tests
  • Writing documentation (where does thie one live already? is it where this guidance should exist all up?)
  • Our code review process
  • Repository maintainer sign-off, per our governance model

Pull Request Workflow

  1. A contributor opens a pull request.
  2. The contributor ensures that their pull request passes the [CI system][ci-system] build.
  • If the build fails, a Repository Maintainer adds the waiting for author label to the pull request. The contributor can then continue to update the pull request until the build passes.
  1. Once the build passes, the maintainer either reviews the pull request immediately or adds the need review label.
  2. A maintainer or trusted contributor reviews the pull request code.
  • If the contributor does not meet the reviewer's standards, the reviewer makes comments. A maintainer then removes the need review label and adds the waiting for author label. The contributor must address the comments and repeat from step 2.
  • If the contributor meets the reviewer's standards, the reviewer comments that they are satisfied. A maintainer then removes the need review label.
  1. Once the code review is completed, a maintainer merges the pull request.

Abandoned Pull Requests

A pull request with the label waiting for the author for more than two weeks without a word from the author is considered abandoned.

In these cases:

  1. Ping the author of PR to remind him of pending changes.
  • If the contributor responds, it's no longer an abandoned pull request, proceed as normal.
  1. If the contributor does not respond within a week:
  • If the reviewer's comments are very minor, merge the change, fix the code immediately, and create a new PR with the fixes addressing the minor comments.
  • If the changes required to merge the pull request are significant but needed, create a new branch with the changes and open an issue to merge the code into the dev branch. Mention the original pull request ID in the description of the new issue and close the abandoned pull request.
  • If the changes in an abandoned pull request are no longer needed (e.g. due to refactoring of the code base or a design change), simply close the pull request.