Skip to content

Cascading Pull Requests

Rushabh Mehta edited this page Jun 12, 2017 · 4 revisions

Cascading Pull Requests (CPR) is a strategy to break down a big features in smaller mergeable parts. Smaller parts are easier to merge, review and have fewer bugs.

The goal is to keep un-shipped code to the minimum.

This document explains how to build a feature in a mergeable way using CPRs

Planning

These are strategies to help you plan how to implement a feature

  1. Make a mockup and get it approved, specially for larger features. This will make sure that the naming and labeling is correct. Fixing a column name or table / DocType name at a later point is going to be very difficult.
  2. Break down the feature into smaller phases so that each phase is complete on its own.
  3. Start from the data structures and move up to the user interface elements.

Execution

  1. Build the smallest possible feature that can be merged and is working
  2. Keep the feature hidden from the user until it is complete
  3. Create a new branch as soon as a phase is completed, so you can continue working even when your earlier phases are not merged.
  4. As soon as your phases get merged, rebase with develop.

Example

If you are working on implementing Global Search, here are suggested phases

  1. Create Index Table
  2. Build Index table for existing data
  3. Update Index table for new inserts and updates
  4. Refactor search bar
  5. Show global search results in the new search bar
  6. Make a modal to show all results in a classified way.
Clone this wiki locally