Skip to content

PR Guidelines

sumedhb1995 edited this page Aug 19, 2020 · 11 revisions

PR Guidelines

Legal

You will need to complete a Contributor License Agreement (CLA) to submit changes. This agreement testifies that you are granting us permission to use the submitted change according to the terms of the project's license, and that the work being submitted is under appropriate copyright. Upon submitting a pull request, you will automatically be given instructions on how to sign the CLA.

Guidelines

The following are some general practices to follow when submitting PRs (Pull Requests) to the Fluid Framework repo to contribute changes. The PRs should:

  1. Have a title and description that explains what the code does
  2. Refers to the issue number the change relates to if there is one a. Use "close" or "fixes" keywords in description followed by the issue number to auto close the issue when the PR is merged
  3. Has at least one official team reviewer approval
  4. Prior to merging the PR (especially for PRs that are more than a day old) to main after it has been approved,
    • Merge in the latest main to your branch and update the PR
      • Make sure that main merges cleanly without any conflicts
      • Make sure it passes all CI builds
    • Do one last quick self review of the change to make sure it is in the state that you want to merge (e.g. no extra files or changes are accidentally included)
  5. Always squash and merge. Also update the squash commit description to be a one-liner summary; usually the PR title is sufficient. The squash and merge prevents unnecessary commits from polluting the merge history and keep it easy to read and track changes.

Submitting Pull Requests

This assumes that you have already created a branch on your own fork with the changes you wish to submit. Please follow the steps here if you have not done this yet.

  1. Navigate to the Pull Requests tab in the official GitHub repo. Here, click "New Pull Request" and you will see this.

Pre-PR

Here, you will need to click on "compare across forks" to start seeing the branches on your fork. Select your fork in "Head repository" and your branch in "compare" for the source:

Setup-PR

  1. Now you can simply click "Create Pull Request" to start the review process. Alternatively, you can also create a "Draft Pull Request" if the branch is still a work-in-progress.
Clone this wiki locally