diff --git a/CHANGELOG.md b/CHANGELOG.md index 29bd5fee..40642f2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,18 @@ # Changelog -## Unreleased +## v1.4.248 (2025-07-16) + +### PR [#1616](https://github.com/danielmiessler/Fabric/pull/1616) by [ksylvan](https://github.com/ksylvan): Preserve PR Numbers During Version Cache Merges + +- Feat: enhance changelog to correctly associate PR numbers with version tags +- Fix: improve PR number parsing with proper error handling +- Collect all PR numbers for commits between version tags +- Associate aggregated PR numbers with each version entry +- Update cached versions with newly found PR numbers + +### Direct commits + +- Docs: reorganize v1.4.247 changelog to attribute changes to PR #1613 ## v1.4.247 (2025-07-15) diff --git a/cmd/generate_changelog/changelog.db b/cmd/generate_changelog/changelog.db index 8bba9fd1..4dc0baec 100644 Binary files a/cmd/generate_changelog/changelog.db and b/cmd/generate_changelog/changelog.db differ diff --git a/cmd/generate_changelog/internal/changelog/generator.go b/cmd/generate_changelog/internal/changelog/generator.go index 75a6a932..c6e3ba2e 100644 --- a/cmd/generate_changelog/internal/changelog/generator.go +++ b/cmd/generate_changelog/internal/changelog/generator.go @@ -210,8 +210,23 @@ func (g *Generator) fetchPRs() error { lastSync, _ = g.cache.GetLastPRSync() } + // Check if we need to sync for missing PRs + missingPRs := false + for _, version := range g.versions { + for _, prNum := range version.PRNumbers { + if _, exists := g.prs[prNum]; !exists { + missingPRs = true + break + } + } + if missingPRs { + break + } + } + // If we have never synced or it's been more than 24 hours, do a full sync - needsSync := lastSync.IsZero() || time.Since(lastSync) > 24*time.Hour || g.cfg.ForcePRSync + // Also sync if we have versions with PR numbers that aren't cached + needsSync := lastSync.IsZero() || time.Since(lastSync) > 24*time.Hour || g.cfg.ForcePRSync || missingPRs if !needsSync { fmt.Fprintf(os.Stderr, "Using cached PR data (last sync: %s)\n", lastSync.Format("2006-01-02 15:04:05"))