Skip to content

feat: maintain full changelog history while publishing truncated version - W-21787149#7659

Draft
madhur310 wants to merge 6 commits into
developfrom
ms/changelog
Draft

feat: maintain full changelog history while publishing truncated version - W-21787149#7659
madhur310 wants to merge 6 commits into
developfrom
ms/changelog

Conversation

@madhur310

@madhur310 madhur310 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Implements a changelog strategy that maintains full historical changelog on the develop branch while keeping release branches small and marketplace-ready.

How it works:

  1. Release branch creation: CHANGELOG.md contains only the new release notes (~50 lines)
  2. Packaging: VSIX includes only those new notes (marketplace size compliant)
  3. Merge to develop: New release notes are automatically prepended to develop's full history

Key changes:

Result:

  • ✅ Develop branch: Full changelog history (currently 191 releases, will keep growing)
  • ✅ Release branches: Only new release notes (small, marketplace-ready)
  • ✅ VSIX packages: Contain only latest release (meets size limits)
  • ✅ Fully automated: Prepending happens during merge workflow
  • ✅ Simpler: No backup/restore dance during packaging

What issues does this PR fix or reference?

Fixes the issue where CHANGELOG.md was truncated each week, losing all historical release notes from the repository. History was only accessible via GitHub releases.

Functionality Before

On develop:

  • CHANGELOG.md: 49 lines (1 release only)
  • Historical changes lost from repository
  • Full history only in GitHub releases

On release branch:

  • Same as develop (49 lines)

During packaging:

  • No special handling needed (already small)

Functionality After

On develop:

  • CHANGELOG.md: 3,811 lines (191 releases spanning 2022-2026)
  • Full history maintained and grows with each release
  • Each merge prepends new release automatically

On release branch:

  • CHANGELOG.md: ~50 lines (just this week's changes)
  • Clean, focused, marketplace-ready

During packaging:

  • No special handling needed (release branch already small)
  • VSIX contains only latest release notes

Example flow:
Create release branch from develop (3,811 lines)
└─> Generate changelog replaces with ~50 lines (new release)

Package & publish
└─> VSIX contains ~50 lines ✅

Merge release → main → develop
└─> Script prepends ~50 lines to develop's 3,811
└─> Develop now has 3,860 lines (history grows)

Next week repeats from step 1

Technical Details

One-time restoration:

  • Ran scripts/restore-changelog-history-from-github.js to fetch all historical releases from GitHub
  • Script extracts only the first changelog section from each release (older releases included full historical changelog in their bodies)
  • Reconstructed 191 releases with proper deduplication
  • Result committed to develop branch

Automated prepending:

  • .github/workflows/mergeReleaseBranch.yml now:
    1. Merges release → main
    2. Merges main → develop
    3. Runs prepend-release-changelog.js to prepend new release to develop's history
    4. Commits the updated CHANGELOG on develop

@W-21787149@

madhur310 and others added 3 commits July 1, 2026 12:56
- Remove 4 temporary CHANGELOG backup files (created by restoration script)
- Revert .claude/skills/changelog/SKILL.md to correct state
- The doc incorrectly referenced 'conventional-changelog-action' but we use custom scripts

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@madhur310 madhur310 changed the title fix: draft feat: maintain full changelog history while publishing truncated version - W-21787149 Jul 2, 2026
madhur310 and others added 3 commits July 2, 2026 11:47
…on merge

Changed from complex backup/restore approach to cleaner design:

Before:
- Generate changelog → prepend to full history on release branch
- During packaging: backup → truncate → package → restore
- Full history maintained on release branch throughout

After:
- Generate changelog → writes ONLY new release (on release branch)
- Package directly (no truncation needed - already small)
- On merge to develop: prepend new section to develop's full history

Benefits:
- Simpler packaging (no backup/restore dance)
- Clearer release branch (only shows what's new)
- Single prepend operation (on merge, not every build)
- Separation of concerns (release = new, develop = full history)

Changes:
- Reverted change-log-generator-utils.js to replace mode
- Removed marketplace prep scripts (no longer needed)
- Updated buildAll.yml (removed prepare/restore steps)
- Added prepend-release-changelog.js (prepends on merge)
- Updated mergeReleaseBranch.yml (runs prepend script)
- Updated documentation

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant