fix: update SetLastPRSync to use version date instead of current time

- Change last_pr_sync to use versionDate instead of time.Now()
- Ensure future runs fetch PRs merged after the version date
- Add clarifying comments explaining the sync timing logic
This commit is contained in:
Kayvan Sylvan
2026-01-03 23:23:19 -08:00
parent f588af0887
commit 3d88f8e2fc

View File

@@ -291,8 +291,9 @@ func (g *Generator) CreateNewChangelogEntry(version string) error {
fmt.Fprintf(os.Stderr, "Warning: Failed to update last_processed_tag: %v\n", err)
}
// Update last_pr_sync to current time
if err := g.cache.SetLastPRSync(time.Now()); err != nil {
// Update last_pr_sync to the version date (not current time)
// This ensures future runs will fetch PRs merged after this version
if err := g.cache.SetLastPRSync(versionDate); err != nil {
fmt.Fprintf(os.Stderr, "Warning: Failed to update last_pr_sync: %v\n", err)
}
}