Merge pull request #1919 from ksylvan/kayvan/one-more-ci-cd-changelog-fix

Fix the `last_pr_sync` setting during PR incoming processing
This commit is contained in:
Kayvan Sylvan
2026-01-03 23:30:54 -08:00
committed by GitHub
2 changed files with 9 additions and 2 deletions

View File

@@ -0,0 +1,6 @@
### PR [#1919](https://github.com/danielmiessler/Fabric/pull/1919) by [ksylvan](https://github.com/ksylvan): Fix the `last_pr_sync` setting during PR incoming processing
- 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

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)
}
}