Remove mandatory Unreleased section requirement and add changelog migration automation #29

Merged
Copilot merged 5 commits from copilot/remove-unreleased-from-changelog into main 2026-01-04 04:16:58 +00:00
Copilot commented 2026-01-04 01:33:10 +00:00 (Migrated from github.com)

Purpose

The changelog validation script required a [Unreleased] section to be present, failing builds when it was absent. This requirement is removed, the unreleased content has been migrated to the current version section, and automation tooling has been added to facilitate future migrations when moving from rc to version branches.

Change Summary

  • scripts/validate/changelog.sh: Removed check that fails validation when ## [Unreleased] is missing
  • Updated structural requirements comment to reflect optional nature of Unreleased section
  • Validation now only requires versioned sections (e.g., ## [x.y.z]) and the target version being validated
  • CHANGELOG.md: Migrated content from [UNRELEASED] section to [03.05.00] 2026-01-04 section
  • scripts/run/migrate_unreleased.sh: New automation script to migrate unreleased changelog entries to versioned sections
    • Supports --date option for custom release dates
    • Includes --dry-run mode for safe previewing before applying changes
    • Optional --keep flag to preserve the unreleased section after migration
    • Handles edge cases (empty/missing unreleased sections, existing version sections)

Testing Evidence

Validated with existing versions and the new version section:

$ VERSION=03.01.00 bash scripts/validate/changelog.sh
{"status":"ok","version":"03.01.00","ref_name":"copilot/remove-unreleased-from-changelog","warnings":[]}

$ VERSION=02.01.05 bash scripts/validate/changelog.sh  
{"status":"ok","version":"02.01.05","ref_name":"copilot/remove-unreleased-from-changelog","warnings":[]}

$ VERSION=03.05.00 bash scripts/validate/changelog.sh
{"status":"ok","version":"03.05.00","ref_name":"copilot/remove-unreleased-from-changelog","warnings":[]}

Tested migration script with multiple scenarios:

$ bash scripts/run/migrate_unreleased.sh 03.06.00 --dry-run
INFO: Found unreleased content (49 chars)
DRY-RUN: Would move 2 lines to [03.06.00]
DRY-RUN: Would empty [Unreleased] section

$ bash scripts/run/migrate_unreleased.sh 03.06.00
SUCCESS: Migrated unreleased content to [03.06.00]

Risk and Rollback

Low risk. Removes validation constraint, consolidates changelog entries into proper version section, and adds optional automation tooling that doesn't affect existing workflows. Rollback: revert commits.

Checklist

  • Follows Conventional Commits
  • Tests added or updated
  • Documentation updated if required
  • License header present where applicable
  • Linked issue(s) referenced

Reviewer Notes

The repo_health.yml workflow still warns when an Unreleased section exists (advisory only, non-blocking). This reflects release readiness concerns but doesn't contradict making the section optional for validation. With the migration of unreleased content to version 03.05.00, this warning will no longer trigger.

The new migrate_unreleased.sh script is designed to be used during the transition from rc to version branches, automating the process of moving unreleased changelog entries to the appropriate version section.

Review and Approval

Original prompt

unrleaed is not required in changelog


Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

## Purpose The changelog validation script required a `[Unreleased]` section to be present, failing builds when it was absent. This requirement is removed, the unreleased content has been migrated to the current version section, and automation tooling has been added to facilitate future migrations when moving from rc to version branches. ## Change Summary - **`scripts/validate/changelog.sh`**: Removed check that fails validation when `## [Unreleased]` is missing - Updated structural requirements comment to reflect optional nature of Unreleased section - Validation now only requires versioned sections (e.g., `## [x.y.z]`) and the target version being validated - **`CHANGELOG.md`**: Migrated content from `[UNRELEASED]` section to `[03.05.00] 2026-01-04` section - **`scripts/run/migrate_unreleased.sh`**: New automation script to migrate unreleased changelog entries to versioned sections - Supports `--date` option for custom release dates - Includes `--dry-run` mode for safe previewing before applying changes - Optional `--keep` flag to preserve the unreleased section after migration - Handles edge cases (empty/missing unreleased sections, existing version sections) ## Testing Evidence Validated with existing versions and the new version section: ```bash $ VERSION=03.01.00 bash scripts/validate/changelog.sh {"status":"ok","version":"03.01.00","ref_name":"copilot/remove-unreleased-from-changelog","warnings":[]} $ VERSION=02.01.05 bash scripts/validate/changelog.sh {"status":"ok","version":"02.01.05","ref_name":"copilot/remove-unreleased-from-changelog","warnings":[]} $ VERSION=03.05.00 bash scripts/validate/changelog.sh {"status":"ok","version":"03.05.00","ref_name":"copilot/remove-unreleased-from-changelog","warnings":[]} ``` Tested migration script with multiple scenarios: ```bash $ bash scripts/run/migrate_unreleased.sh 03.06.00 --dry-run INFO: Found unreleased content (49 chars) DRY-RUN: Would move 2 lines to [03.06.00] DRY-RUN: Would empty [Unreleased] section $ bash scripts/run/migrate_unreleased.sh 03.06.00 SUCCESS: Migrated unreleased content to [03.06.00] ``` ## Risk and Rollback Low risk. Removes validation constraint, consolidates changelog entries into proper version section, and adds optional automation tooling that doesn't affect existing workflows. Rollback: revert commits. ## Checklist - [x] Follows Conventional Commits - [ ] Tests added or updated - [ ] Documentation updated if required - [x] License header present where applicable - [ ] Linked issue(s) referenced ## Reviewer Notes The `repo_health.yml` workflow still warns when an Unreleased section exists (advisory only, non-blocking). This reflects release readiness concerns but doesn't contradict making the section optional for validation. With the migration of unreleased content to version 03.05.00, this warning will no longer trigger. The new `migrate_unreleased.sh` script is designed to be used during the transition from rc to version branches, automating the process of moving unreleased changelog entries to the appropriate version section. ## Review and Approval <!-- START COPILOT CODING AGENT SUFFIX --> <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > unrleaed is not required in changelog </details> <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/mokoconsulting-tech/moko-cassiopeia/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.
jmiller-moko (Migrated from github.com) reviewed 2026-01-04 01:33:10 +00:00
jmiller-moko commented 2026-01-04 01:37:49 +00:00 (Migrated from github.com)

@copilot anything in the unreleased section should be moved to the current version heading

@copilot anything in the unreleased section should be moved to the current version heading
Copilot commented 2026-01-04 01:39:39 +00:00 (Migrated from github.com)

@copilot anything in the unreleased section should be moved to the current version heading

Done. Moved the unreleased content to [03.05.00] 2026-01-04 section in commit 5a4003b.

> @copilot anything in the unreleased section should be moved to the current version heading Done. Moved the unreleased content to `[03.05.00] 2026-01-04` section in commit 5a4003b.
jmiller-moko commented 2026-01-04 02:00:32 +00:00 (Migrated from github.com)

@copilot when moving from rc to version any items in unrelaeased section of changelog should be moved to the version eghading, and add scripts in "scripts/run/"

@copilot when moving from rc to version any items in unrelaeased section of changelog should be moved to the version eghading, and add scripts in "scripts/run/"
Copilot commented 2026-01-04 02:06:12 +00:00 (Migrated from github.com)

@copilot when moving from rc to version any items in unrelaeased section of changelog should be moved to the version eghading, and add scripts in "scripts/run/"

Created scripts/run/migrate_unreleased.sh in commits a0babe2 and dab2477. The script automates migration of unreleased changelog entries to version headings when moving from rc to version branches.

Features:

  • Moves content from [Unreleased] to specified version section
  • Supports --date, --dry-run, and --keep options
  • Handles edge cases (empty/missing unreleased section)

Usage:

scripts/run/migrate_unreleased.sh 03.05.00
scripts/run/migrate_unreleased.sh 03.05.00 --date 2026-01-04
scripts/run/migrate_unreleased.sh 03.05.00 --dry-run
> @copilot when moving from rc to version any items in unrelaeased section of changelog should be moved to the version eghading, and add scripts in "scripts/run/" Created `scripts/run/migrate_unreleased.sh` in commits a0babe2 and dab2477. The script automates migration of unreleased changelog entries to version headings when moving from rc to version branches. Features: - Moves content from [Unreleased] to specified version section - Supports `--date`, `--dry-run`, and `--keep` options - Handles edge cases (empty/missing unreleased section) Usage: ```bash scripts/run/migrate_unreleased.sh 03.05.00 scripts/run/migrate_unreleased.sh 03.05.00 --date 2026-01-04 scripts/run/migrate_unreleased.sh 03.05.00 --dry-run ```
jmiller-moko commented 2026-01-04 02:21:25 +00:00 (Migrated from github.com)

@copilot add a dolibar build zip and create release workflow, use ftp secrets and avariables in moko-cassiopeia/.github/workflows/release_pipeline.yml, also use the same branch hierarchy

@copilot add a dolibar build zip and create release workflow, use ftp secrets and avariables in moko-cassiopeia/.github/workflows/release_pipeline.yml, also use the same branch hierarchy
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoCassiopeia#29