[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: https://github.com/frappe/erpnext/wiki/Preparing-a-Contribution-Proposal

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. https://github.com/mntechnique/erpnext/tree/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. https://github.com/frappe/erpnext/pull/13395
  2. https://github.com/frappe/erpnext/pull/13816
8 Likes