Builds the items of a release checklist (Checklist) from its recipe: what changed in the repositories, what the board's tickets say to check, and what no ticket covers.
class MMO\admin\helpers\ChecklistBuilder
Namespace
MMO\admin\helpers
The recipe, kept in the checklist (`recipe`):
{"repositories": [{"label": "my.oviepro", "path": "~/dev/src/my.oviepro", "exclude": ["libs/"], "together": ["modules/IJSS/"]}],
"treated": "/\\*\\*Claude — (résultat|result)\\*\\* /u",
"site": "http://localhost/my.oviepro/",
"pages": "my.oviepro — pages",
"checks": {"12": {"page": "declaration/MaladiePro", "check": "INRS references readable", "url": "gestion/maladies"}},
"items": [{"group": "before committing", "section": "verify", "title": "`php tools/mmo.php verify` passes", "detail": "..."}],
"itemsFile": "src/pages/admin/release-checklist.items.json",
"texts": {"diff": "Relire le diff : `git -C {root} diff -- {path}`", ...}}
- **repositories**: one `code` item per changed file (`git status`), grouped under the repository's label and a section
for its folder ([`section`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/helpers/ChecklistBuilder.md#checklistbuilder-section)). A path of `together` is one item for all its files (a deleted module, a folder of
fonts), a path of `exclude` is left out (a hub's `libs/`, whose submodules are repositories of their own). A file
of `src/pages` is in its page's section, unless `"pages": false` (a library, whose `src/pages` are not its own). An item
names the tickets whose discussion cites the file ([`mentions`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/helpers/ChecklistBuilder.md#checklistbuilder-mentions)): a file no ticket cites is a transverse change.
- **treated**: a regular expression; a ticket whose discussion matches it was treated, and gets a functional check.
The default matches the result comment an agent writes (`**Claude — résultat**`, `**Claude — result**`).
- **checks**: the functional check of a ticket, on a page. Without one, the last ```` ```check ```` block of the
ticket's discussion (else of its description) gives them, one per line: `page | what to check`, or
`page | url | what to check`. A treated ticket with neither gets an item asking to check its result on screen.
- **site**: what a relative `url` is relative to. **pages**: the group of the functional checks.
- **items** / **itemsFile**: items written by hand -- what to do before committing, what to clean up after. The file
is flat items, or a page by page functional test: `{members, types, sections: [{label, icon, pages: [{label, path,
note, checks: [{label, type}]}]}]}`, whose `members`, `types` and sections' icons the checklist takes too
([`meta`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/helpers/ChecklistBuilder.md#checklistbuilder-meta)).
$board = KanbanBoard::Edit('boards/acme.json', fn(KanbanBoard $b) => $b);
$builder = new ChecklistBuilder(['repositories' => [['label' => 'acme', 'path' => '~/dev/src/acme']]], $board);
$items = $builder->build();
$builder->orphans(); // the files no ticket cites
string, check: string, url?: ?string}> the functional checks of a ticket: from the recipe's checks, else from the last ````check ``` block of its discussion, else of its description
list<string>, types: array<string, array{label: string, icon: string}>, groups: array<string, array{icon: string}>} what the last build read besides the items: the members of a page by page file, what each type of check is called (the file's types, the recipe's over them), each section's icon
a path of the recipe: ~/ is the home folder of whoever owns the application's folder -- the developer, not the web server running the request -- {root}... as filename
what the items depend on when they come from the recipe alone (items, itemsFile): its hash, which changes when the file or the recipe does; null for a recipe reading repositories or a board, which only a build says
(new ChecklistBuilder(['itemsFile' => '{root}/checklists/general.json']))->source(); // 'a3f1...'