Sync NJPW with upstream Build Elevate
Use this runbook when syncing Accedo-PS-APAC/njpw-web with the fork source Accedo-Global-Solutions/build-elevate-web.
Important: raise the PR in Accedo-PS-APAC/njpw-web, not in Accedo-Global-Solutions/build-elevate-web.
Repository setup
- NJPW fork remote:
origin->https://github.com/Accedo-PS-APAC/njpw-web.git - Build Elevate upstream remote:
upstream->https://github.com/Accedo-Global-Solutions/build-elevate-web.git - Target PR base branch:
maininAccedo-PS-APAC/njpw-web
If upstream is missing:
git remote add upstream https://github.com/Accedo-Global-Solutions/build-elevate-web.git
git remote set-url --push upstream https://UPSTREAM_IS_READ_ONLY
Sync steps
Start from a clean working tree:
git status --short --branch
Fetch latest refs:
git fetch origin --prune
git fetch upstream --prune
Create a sync branch from NJPW main:
git checkout main
git pull origin main
git checkout -b chore/sync-upstream-main-YYYY-MM-DD
Merge Build Elevate into the sync branch:
git merge upstream/main --allow-unrelated-histories --no-edit
If there are conflicts, resolve them, then continue:
git status
git add .
git commit --no-edit
Do not paste signing key passphrases into chat. Enter them locally when Git prompts.
Verify sync
Check whether any upstream commits are missing:
git rev-list --left-right --count HEAD...upstream/main
Expected shape:
N 0
The second number must be 0. That means the sync branch contains all commits from upstream/main.
Extra check:
git log --oneline HEAD..upstream/main
Expected result: no output.
Final ancestry check:
git merge-base --is-ancestor upstream/main HEAD && echo "Fully synced from upstream"
Validate locally
Run:
pnpm lint:all
pnpm test:once --runInBand
If Jest fails because Watchman cannot access its socket, rerun the same command with normal local permissions.
Push and raise PR
Push the sync branch to NJPW:
git push -u origin chore/sync-upstream-main-YYYY-MM-DD
Raise the PR in:
Accedo-PS-APAC/njpw-web
Use:
- Base:
main - Head:
chore/sync-upstream-main-YYYY-MM-DD - Title:
chore: sync upstream main
Do not raise the PR in:
Accedo-Global-Solutions/build-elevate-web
Short future prompt
Use this prompt next time:
Follow docs/docs/Development/sync_upstream.md to sync njpw-web with upstream Build Elevate and raise the PR in Accedo-PS-APAC/njpw-web.