changelog

package
v0.4.0-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatMarkdown

func FormatMarkdown(breaking, features, fixes []ConventionalCommit, other []git.Commit, repo, baseSHA, headSHA string) string

FormatMarkdown generates a markdown changelog with emoji headers, scope grouping, and collapsible sections

func IsRoutineType

func IsRoutineType(t string) bool

IsRoutineType returns true for commit types that should be skipped in changelog

func LookupGitHubUsernames

func LookupGitHubUsernames(commits []git.Commit, repo string) []git.Commit

LookupGitHubUsernames looks up GitHub usernames for commits via a single GraphQL query. It deduplicates by author email, so 500 commits by 5 authors results in 1 API call.

func NewCommand

func NewCommand() *cobra.Command

NewCommand creates the generate-changelog command

Types

type ChangelogResult

type ChangelogResult struct {
	Changelog   string `json:"changelog"`
	HasBreaking bool   `json:"has_breaking"`
	HasFeatures bool   `json:"has_features"`
	HasFixes    bool   `json:"has_fixes"`
}

ChangelogResult is the output of generate-changelog command

type ConventionalCommit

type ConventionalCommit struct {
	Type           string // feat, fix, docs, chore, etc.
	Scope          string // optional scope in parentheses
	Breaking       bool   // has ! or BREAKING CHANGE
	Description    string // the commit description
	Hash           string // short hash
	FullHash       string // full hash
	Author         string // commit author name
	AuthorEmail    string // author email for deduplication
	GitHubUsername string // GitHub username (looked up via API)
	PRNumber       string // PR number if present in description (e.g., "#123")
}

ConventionalCommit represents a parsed conventional commit

func CategorizeCommits

func CategorizeCommits(commits []git.Commit) (breaking, features, fixes []ConventionalCommit, other []git.Commit)

CategorizeCommits groups commits by type

func LookupConventionalCommitUsernames

func LookupConventionalCommitUsernames(commits []ConventionalCommit, repo string) []ConventionalCommit

LookupConventionalCommitUsernames looks up GitHub usernames for conventional commits

func ParseCommit

func ParseCommit(commit git.Commit) *ConventionalCommit

ParseCommit parses a git commit into a ConventionalCommit

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL