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:
Kayvan Sylvan
2025-07-21 09:37:02 -07:00
parent 76d6b1721e
commit 42afd92f31
2 changed files with 4 additions and 4 deletions

View File

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

View File

@@ -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()