Skip to content

Conversation

mroth
Copy link
Owner

@mroth mroth commented Jul 23, 2025

This should make any future UX refactoring easier. Also cleans up changelog render code a tiny bit while I'm in there.

also cleanup changelog render code
@mroth mroth requested a review from Copilot July 23, 2025 14:28
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the changelog rendering functionality by extracting it into a separate module with golden file tests. The changes improve code organization and add comprehensive test coverage for changelog rendering functions.

  • Moved changelog rendering functions from main.go to a dedicated changelog.go file
  • Added golden file tests for both screen and markdown changelog rendering
  • Cleaned up the changelog rendering implementation with better variable naming and use of strings.Builder

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
main.go Removed changelog functions and updated function calls to use new capitalized names
changelog.go New file containing refactored changelog rendering functions with improved implementation
changelog_test.go Added comprehensive golden file tests with sample commit data
go.mod Added google/go-cmp dependency for test comparisons
testdata/sample_screen.golden Golden file for screen changelog output format
testdata/sample_markdown.golden Golden file for markdown changelog output format

@mroth mroth merged commit f0d3f6c into main Jul 23, 2025
5 checks passed
@mroth mroth deleted the refactor-changelog branch July 23, 2025 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant