skill-doli-upmerge
GitHub用于执行 Dolibarr 维护分支的级联正向合并(upmerge)。通过调用 pullmerge.sh 脚本自动拉取并合并版本,人工解决冲突后不提交,等待用户确认后重启流程,确保代码从旧版向新版正确同步。
Trigger Scenarios
Install
npx skills add Dolibarr/dolibarr --skill skill-doli-upmerge -g -y
SKILL.md
Frontmatter
{
"name": "skill-doli-upmerge",
"license": "MIT",
"description": "Forward-port (upmerge) Dolibarr maintenance branches in cascade (n into n+1, up to develop) with dev\/pullmerge.sh, and resolve merge conflicts without committing. Use when asked to do an upmerge, a forward port, a cascade merge, or to run pullmerge.sh.",
"user-invocable": true
}
Upmerge / forward porting of Dolibarr branches
Layout
Each maintenance branch has its own local clone, in the same parent directory:
dolibarr_14.0, dolibarr_15.0, ..., dolibarr_24.0 (one directory = one branch xx.0),
plus dolibarr_dev for the branch develop.
The script dolibarr_dev/dev/pullmerge.sh must be run from this parent directory
(it uses relative paths dolibarr_xx.0).
Procedure
-
Run the script, from the parent directory, starting from the requested version (default 14):
./dolibarr_dev/dev/pullmerge.sh all 14all: pull the last version of each branch (each directory), then merge each version n into n+1, then the last one intodevelop.pullormergealone can be used.merge 16restarts the cascade from 16 into 17.- On a successful merge, the script pushes automatically. This is expected behaviour.
-
As soon as the script fails, go into the directory of the branch where the merge failed (the one named in
ERROR : Conflict or error on merge into dolibarr_xx.0) and try to resolve the conflicts:git status/git diffto list conflicted files.- Understand the intent of the change coming from the previous branch (often a fix, sometimes a security fix)
and keep it, while keeping the changes specific to the current branch (refactoring such as
$user->hasRight(), new hooks, new variables...). - Also check files that git merged automatically when the fix touches the same logic
(for example: no duplicated or misplaced
restrictedArea()call left before the object fetch). - Check there is no conflict marker left and run
php -lon each resolved file.
-
Do not commit, do not
git add, do not push. Just report:- that the conflict has been resolved, with a short summary per file of the choice made,
- or that the resolution of a conflict is a problem (ambiguous intent, functional choice needed...), and why.
-
Once the user has committed and pushed the resolution, restart the cascade from that version:
./dolibarr_dev/dev/pullmerge.sh merge <version where it failed>Before restarting, check with
git status/git login the directory that the merge commit exists and was pushed. Then repeat step 2 on the next failure, until the script ends withSuccess !.
Version History
- f924282 Current 2026-10-19 03:57


