<aside> 🔁 Synced from GitHub #4933a01041f7. Edit in the paidhr-system-docs repository, not here: changes made in Notion are overwritten.

</aside>

Branching & PR flow

The flow (core-backend-service and ewa-service)

  1. Create the branch off staging.
  2. Merge it into develop and test it there.
  3. Once tested, promote the same branch to staging (a second PR from the same branch).
  4. Staging moves to main/master as a whole at release.
flowchart LR
  STG[staging] -->|1. branch off| F[feature branch]
  F -->|2. PR, test here| DEV[develop]
  F -->|3. PR, same branch| STG
  STG -->|4. release, whole branch| MAIN[main / master]
  DEV -. never .-> STG

Why: develop is a test bed carrying work not cleared for release. If a branch were cut from develop, promoting it would drag that unreleased work into staging and then production.

web-app

Lineage Branch Use
Production main Hotfixes
Staging staging Cut new work here
Dev develope Backport only

mobile

develop mainline, release/x.x.x, feature/-name, hotfix/x.x.x from master.

Before opening a PR