[How-to] PR based feature delivery

The problem:

  1. Clients want features yesterday.

What to do:

  1. Try to see if the request fits in vanilla. Explore.
  2. Sieve requirements. Generalize.
  3. Write standards compliant code.
    More: Preparing a Contribution Proposal · frappe/erpnext Wiki · GitHub

How to implement:

  1. Fork master branch as feature branch.
  2. Implement feature on feature branch, a.k.a production branch.
  3. Deploy production branch (master + feature) on production server for client.
  4. Fork feature branch as PR branch.
  5. Pull develop into PR branch.
  6. Initiate PR, following guidelines.

Precautions:

  1. Keep commits small: One feature per commit, or split further.

Code Changes

  1. Use git cherry-pick to pick changes from PR branch onto production branch.

Bench Update?

  1. Pull upstream/master into production branch(master + feature) locally and run tests.
  2. Update production branch on production server.

Example:
Production branch for our client. Contains code for what would be a PR for Exotel Integration. GitHub - mntechnique/erpnext at master-km
PRs:
(Working features, but much left to be desired: Closed functional loops, expecation management, security.)
(High chance of PR being closed because it is large and needs to be broken into smaller PRs.)

  1. Telephony services' integration by saurabh-bhosale · Pull Request #13395 · frappe/erpnext · GitHub
  2. CRM dashboard by saurabh-bhosale · Pull Request #13816 · frappe/erpnext · GitHub
8 Likes