feat: mermaid diagrams, callouts, reader polish and a manual release workflow - #2
Conversation
✅ Magebit Code Review — Review completeNo blocking issues were found.
Magebit ReviewCritical: 0 · High: 0 · Medium: 1 · Low: 0 · Info: 0 Notable findings:
Changed files (27).github/
Docs/
Model/
Test/
etc/
i18n/
view/
(root)
💬 AI reviews are still being rolled out — your feedback shapes them. On the Portal run you can rate each finding, add a note to it, or leave feedback on the whole review. Leave feedback → Reviewed by |
1a1f9ce to
ac8bb02
Compare
|
|
||
| - name: Write the changelog with the next version in it | ||
| id: changelog | ||
| uses: orhun/git-cliff-action@v4 |
There was a problem hiding this comment.
[Medium] Release workflow pins git-cliff-action to a moving tag
security · general profile · confidence 90%
The new release job can push commits and tags to master, but it loads orhun/git-cliff-action from the moving tag v4. Anyone who can move that tag can change what runs with write access to this repository.
The git-cliff binary is already pinned (version: v2.14.1). Do the same for the action itself at both call sites (this step and the release-notes step around line 94): pin the full commit SHA and leave # v4 as a comment so updates stay readable.
Suggested fix
uses: orhun/git-cliff-action@3d96a18 # v4
What changes
Mermaid diagrams — a
```mermaidfence is drawn in the browser. Mermaid 11.17.2 is vendored (no CDN, works under the enforced admin CSP) and only loaded on pages that contain a diagram. A diagram Mermaid cannot read keeps its source visible with a short message. The vendored file is the official build wrapped in one line above and one below, because two libraries bundled inside it (fastdom, fastdom-promised) look for RequireJS before CommonJS and would otherwise register as AMD modules; CI strips the wrapper and checks the official sha256.Callouts — GitHub-style
> [!NOTE]/[!TIP]/[!IMPORTANT]/[!WARNING]/[!CAUTION]blockquotes render as coloured boxes with a title and icon. Implemented as a CommonMark extension; plain blockquotes are untouched.Reader polish — footnotes, the "On this page" panel follows the heading being read, images and drawn diagrams open full screen on click (Esc closes, focus is restored), wide tables scroll sideways instead of breaking the layout, external links carry a small arrow, and a print stylesheet hides the chrome.
Manual release workflow —
Releaseruns from the Actions tab only (workflow_dispatch, master only). git-cliff works out the next version from the conventional commits since the last tag (feat→ minor,fix/others → patch, breaking → major), with abumpoverride and adry_runinput. It regeneratesCHANGELOG.md, commits it, tagsvX.Y.Z, pushes both and publishes a GitHub release.CHANGELOG.mdis generated now for the existing history and registered in the viewer via<changelog>. A protectedmasterneeds aRELEASE_TOKENsecret or an Actions bypass — see the README.Verification
securitypolicyviolationevents, no console errors. The failed-diagram path shows the message and removes Mermaid's stray error drawing.