refactor: Various cleanup (#11)

* refactor: interface for commit message analyzer

* refactor: interface for versioning strategy

* refactor(releasepr): rebuild pr description

Build PR description from scratch and parsed values instead of copying some of the AST to next description.
This commit is contained in:
Julian Tölle 2024-08-08 19:01:44 +02:00 committed by GitHub
parent 8f106e4028
commit d8daad7623
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 197 additions and 268 deletions

View file

@ -308,7 +308,7 @@ func (g *GitHub) Changesets(ctx context.Context, commits []Commit) ([]Changeset,
log = log.With("pullrequest.id", pullrequest.GetID())
// TODO: Parse PR description for overrides
changelogEntries, _, err := AnalyzeCommits([]Commit{commit})
changelogEntries, err := NewConventionalCommitsParser().AnalyzeCommits([]Commit{commit})
if err != nil {
log.Warn("unable to parse changelog entries", "error", err)
continue