mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-01-07 21:44:02 -05:00
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:
6
cmd/generate_changelog/incoming/1919.txt
Normal file
6
cmd/generate_changelog/incoming/1919.txt
Normal 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
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user