mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-01-10 06:48:04 -05:00
refactor: rename ProcessIncomingPRs to CreateNewChangelogEntry for clarity
## CHANGES - Rename ProcessIncomingPRs method to CreateNewChangelogEntry - Update method comment to reflect new name - Update main.go to call renamed method - Reduce newline spacing in content formatting
This commit is contained in:
@@ -61,8 +61,8 @@ func (g *Generator) ProcessIncomingPR(prNumber int) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ProcessIncomingPRs aggregates all incoming PR files for release and includes direct commits
|
||||
func (g *Generator) ProcessIncomingPRs(version string) error {
|
||||
// CreateNewChangelogEntry aggregates all incoming PR files for release and includes direct commits
|
||||
func (g *Generator) CreateNewChangelogEntry(version string) error {
|
||||
files, err := filepath.Glob(filepath.Join(g.cfg.IncomingDir, "*.txt"))
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to scan incoming directory: %w", err)
|
||||
@@ -115,7 +115,7 @@ func (g *Generator) ProcessIncomingPRs(version string) error {
|
||||
|
||||
if directCommitsContent != "" {
|
||||
if content.Len() > 0 {
|
||||
content.WriteString("\n\n")
|
||||
content.WriteString("\n")
|
||||
}
|
||||
content.WriteString(directCommitsContent)
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ func run(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
if cfg.ProcessPRsVersion != "" {
|
||||
return generator.ProcessIncomingPRs(cfg.ProcessPRsVersion)
|
||||
return generator.CreateNewChangelogEntry(cfg.ProcessPRsVersion)
|
||||
}
|
||||
|
||||
output, err := generator.Generate()
|
||||
|
||||
Reference in New Issue
Block a user