mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-01-09 22:38:10 -05:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85780fee76 | ||
|
|
497b1ed682 | ||
|
|
135433b749 | ||
|
|
f185dedb37 | ||
|
|
c74a157dcf | ||
|
|
91a336e870 | ||
|
|
5212fbcc37 | ||
|
|
6d8eb3d2b9 | ||
|
|
d3bba5d026 | ||
|
|
699762b694 | ||
|
|
f2a6f1bd98 | ||
|
|
3176adf59b | ||
|
|
7e29966622 | ||
|
|
0af0ab683d |
@@ -7,6 +7,8 @@ on:
|
||||
paths-ignore:
|
||||
- "data/patterns/**"
|
||||
- "**/*.md"
|
||||
- "data/strategies/**"
|
||||
- "cmd/generate_changelog/*.db"
|
||||
|
||||
permissions:
|
||||
contents: write # Ensure the workflow has write permissions
|
||||
|
||||
38
CHANGELOG.md
38
CHANGELOG.md
@@ -1,5 +1,43 @@
|
||||
# Changelog
|
||||
|
||||
## v1.4.249 (2025-07-16)
|
||||
|
||||
### PR [#1617](https://github.com/danielmiessler/Fabric/pull/1617) by [ksylvan](https://github.com/ksylvan): Improve PR Sync Logic for Changelog Generator
|
||||
|
||||
- Preserve PR numbers during version cache merges
|
||||
- Enhance changelog to associate PR numbers with version tags
|
||||
- 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
|
||||
|
||||
## 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)
|
||||
|
||||
### PR [#1613](https://github.com/danielmiessler/Fabric/pull/1613) by [ksylvan](https://github.com/ksylvan): Improve AI Summarization for Consistent Professional Changelog Entries
|
||||
|
||||
- Feat: enhance changelog generation with incremental caching and improved AI summarization
|
||||
- Add incremental processing for new Git tags since cache
|
||||
- Implement `WalkHistorySinceTag` method for efficient history traversal
|
||||
- Add custom patterns directory support to plugin registry
|
||||
- Feat: improve error handling in `plugin_registry` and `patterns_loader`
|
||||
|
||||
### Direct commits
|
||||
|
||||
- Docs: update README for GraphQL optimization and AI summary features
|
||||
|
||||
## v1.4.246 (2025-07-14)
|
||||
|
||||
### PR [#1611](https://github.com/danielmiessler/Fabric/pull/1611) by [ksylvan](https://github.com/ksylvan): Changelog Generator: AI-Powered Automation for Fabric Project
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package main
|
||||
|
||||
var version = "v1.4.247"
|
||||
var version = "v1.4.251"
|
||||
|
||||
Binary file not shown.
@@ -107,8 +107,13 @@ func (g *Generator) collectData() error {
|
||||
// Merge new versions into cached versions (only add if not already cached)
|
||||
for name, version := range newVersions {
|
||||
if name != "Unreleased" { // Handle Unreleased separately
|
||||
if _, exists := g.versions[name]; !exists {
|
||||
if existingVersion, exists := g.versions[name]; !exists {
|
||||
g.versions[name] = version
|
||||
} else {
|
||||
// Update existing version with new PR numbers if they're missing
|
||||
if len(existingVersion.PRNumbers) == 0 && len(version.PRNumbers) > 0 {
|
||||
existingVersion.PRNumbers = version.PRNumbers
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -205,8 +210,26 @@ 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 missingPRs {
|
||||
fmt.Fprintf(os.Stderr, "Full sync triggered due to missing PRs in cache.\n")
|
||||
}
|
||||
// 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"))
|
||||
|
||||
@@ -314,6 +314,7 @@ func (w *Walker) WalkHistorySinceTag(sinceTag string) (map[string]*Version, erro
|
||||
|
||||
versions := make(map[string]*Version)
|
||||
currentVersion := "Unreleased"
|
||||
prNumbers := make(map[string][]int)
|
||||
|
||||
err = commitIter.ForEach(func(c *object.Commit) error {
|
||||
// Stop iteration when the hash of the current commit matches the hash of the specified sinceTag commit
|
||||
@@ -348,12 +349,15 @@ func (w *Walker) WalkHistorySinceTag(sinceTag string) (map[string]*Version, erro
|
||||
}
|
||||
|
||||
// Check for PR merge pattern
|
||||
if commit.IsMerge {
|
||||
if matches := prPattern.FindStringSubmatch(commit.Message); len(matches) > 1 {
|
||||
if prNumber, err := strconv.Atoi(matches[1]); err == nil {
|
||||
commit.PRNumber = prNumber
|
||||
}
|
||||
if matches := prPattern.FindStringSubmatch(commit.Message); len(matches) > 1 {
|
||||
prNumber, err := strconv.Atoi(matches[1])
|
||||
if err != nil {
|
||||
// Handle parsing error (e.g., log it or skip processing)
|
||||
return fmt.Errorf("failed to parse PR number: %v", err)
|
||||
}
|
||||
commit.PRNumber = prNumber
|
||||
|
||||
prNumbers[currentVersion] = append(prNumbers[currentVersion], prNumber)
|
||||
}
|
||||
|
||||
// Add commit to current version
|
||||
@@ -375,6 +379,11 @@ func (w *Walker) WalkHistorySinceTag(sinceTag string) (map[string]*Version, erro
|
||||
err = nil
|
||||
}
|
||||
|
||||
// Assign collected PR numbers to each version
|
||||
for version, prs := range prNumbers {
|
||||
versions[version].PRNumbers = dedupInts(prs)
|
||||
}
|
||||
|
||||
return versions, err
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
"1.4.247"
|
||||
"1.4.251"
|
||||
|
||||
Reference in New Issue
Block a user