fix(ci): make changelog promotion idempotent and structure-preserving #68

Merged
jmiller merged 1 commits from fix/changelog-promote-structure into dev 2026-07-18 21:45:49 +00:00
Owner

Fixes the auto-release Update release notes and promote changelog step, whose blind content.replace('## [Unreleased]', ...) injected an empty version header, pushed the intro below the section headers, and compounded on re-runs (observed on MokoSuiteStoreLocator: intro below two [01.04.00] headers).

The step now parses the changelog into a top header block plus ## [ sections and promotes only when [Unreleased] has real content (a ### subheading or a bullet), moving that content under a new version header and leaving [Unreleased] empty. Re-runs and empty [Unreleased] leave the file byte-identical (EOL-preserving), so CI produces no spurious commit. Validated against three cases: content->promote, re-run->no-op, empty->no-op.

Template-level fix (sync-overwrites consuming repos). Other Joomla repos likely have the same CHANGELOG corruption and may need a one-time cleanup.

Authored-by: Moko Consulting

Fixes the auto-release `Update release notes and promote changelog` step, whose blind `content.replace('## [Unreleased]', ...)` injected an empty version header, pushed the intro below the section headers, and compounded on re-runs (observed on MokoSuiteStoreLocator: intro below two `[01.04.00]` headers). The step now parses the changelog into a top header block plus `## [` sections and promotes only when `[Unreleased]` has real content (a `###` subheading or a bullet), moving that content under a new version header and leaving `[Unreleased]` empty. Re-runs and empty `[Unreleased]` leave the file byte-identical (EOL-preserving), so CI produces no spurious commit. Validated against three cases: content->promote, re-run->no-op, empty->no-op. Template-level fix (sync-overwrites consuming repos). Other Joomla repos likely have the same CHANGELOG corruption and may need a one-time cleanup. Authored-by: Moko Consulting
jmiller changed target branch from main to dev 2026-07-18 21:45:42 +00:00
jmiller added 1 commit 2026-07-18 21:45:42 +00:00
fix(ci): make changelog promotion idempotent and structure-preserving
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Has been skipped
Generic: Project CI / Lint & Validate (pull_request) Has been skipped
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Has been skipped
Generic: Repo Health / Site Health (pull_request) Has been skipped
Generic: Repo Health / Access control (pull_request) Successful in 2s
Generic: Standards Compliance / Secret Scanning (pull_request) Successful in 6s
Generic: Standards Compliance / License Header Validation (pull_request) Successful in 5s
Generic: Standards Compliance / Repository Structure Validation (pull_request) Successful in 6s
Generic: Standards Compliance / Coding Standards Check (pull_request) Successful in 7s
Generic: Standards Compliance / Workflow Configuration Check (pull_request) Failing after 6s
Generic: Standards Compliance / Documentation Quality Check (pull_request) Successful in 5s
Generic: Standards Compliance / README Completeness Check (pull_request) Failing after 5s
Generic: Standards Compliance / Git Repository Hygiene (pull_request) Successful in 6s
Generic: Standards Compliance / Script Integrity Validation (pull_request) Successful in 9s
Generic: Standards Compliance / Line Length Check (pull_request) Successful in 5s
Generic: Standards Compliance / File Naming Standards (pull_request) Successful in 4s
Generic: Standards Compliance / Insecure Code Pattern Detection (pull_request) Successful in 3s
Generic: Standards Compliance / Version Consistency Check (pull_request) Successful in 1m0s
Generic: Standards Compliance / Dead Code Detection (pull_request) Successful in 8s
Generic: Standards Compliance / File Size Limits (pull_request) Successful in 6s
Generic: Standards Compliance / Binary File Detection (pull_request) Successful in 7s
Generic: Standards Compliance / TODO/FIXME Tracking (pull_request) Successful in 3s
Generic: Standards Compliance / Code Complexity Analysis (pull_request) Successful in 1m4s
Generic: Standards Compliance / Code Duplication Detection (pull_request) Successful in 1m3s
Generic: Standards Compliance / Broken Link Detection (pull_request) Successful in 4s
Generic: Standards Compliance / API Documentation Coverage (pull_request) Successful in 4s
Generic: Standards Compliance / Accessibility Check (pull_request) Successful in 5s
Generic: Standards Compliance / Performance Metrics (pull_request) Successful in 5s
Generic: Standards Compliance / Dependency Vulnerability Scanning (pull_request) Successful in 1m6s
Generic: Standards Compliance / Unused Dependencies Check (pull_request) Successful in 1m8s
Generic: Standards Compliance / Enterprise Readiness Check (pull_request) Successful in 59s
Generic: Standards Compliance / Terraform Configuration Validation (pull_request) Successful in 11s
Generic: Standards Compliance / Repository Health Check (pull_request) Successful in 1m9s
Generic: Project CI / Tests (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report: Scripts Governance (pull_request) Has been cancelled
Generic: Repo Health / Report: Repository Health (pull_request) Has been cancelled
Generic: Standards Compliance / Compliance Summary (pull_request) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Universal: PR Check / Secret Scan (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
RC Revert / Rename rc/ back to dev/ (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
25958fcb78
The auto-release 'promote changelog' step used a blind string replace of the
'## [Unreleased]' marker, which injected an empty version header, pushed the
intro block below the version headers, and compounded on every re-run. Rewrite
it to parse the changelog into a top header block plus '## [' sections, promote
only when [Unreleased] has real content (a ### subheading or a bullet), move
that content under a new version header, and leave [Unreleased] empty. No-op
runs leave the file byte-identical (EOL-preserving) so CI makes no spurious
commit.

Authored-by: Moko Consulting
jmiller merged commit 5045c4bf95 into dev 2026-07-18 21:45:49 +00:00
jmiller deleted branch fix/changelog-promote-structure 2026-07-18 21:45:53 +00:00
Sign in to join this conversation.
No Reviewers
Priority -
Type -
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/Template-Joomla#68