mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-02-07 10:17:02 +00:00
refactor: move commit analyzing out of forge
This commit is contained in:
parent
f2a982d7a0
commit
5882a6bf2c
11 changed files with 152 additions and 188 deletions
15
commits.go
15
commits.go
|
|
@ -7,6 +7,19 @@ import (
|
|||
"github.com/leodido/go-conventionalcommits/parser"
|
||||
)
|
||||
|
||||
type Commit struct {
|
||||
Hash string
|
||||
Message string
|
||||
|
||||
PullRequest *PullRequest
|
||||
}
|
||||
|
||||
type PullRequest struct {
|
||||
ID int
|
||||
Title string
|
||||
Description string
|
||||
}
|
||||
|
||||
type AnalyzedCommit struct {
|
||||
Commit
|
||||
Type string
|
||||
|
|
@ -34,7 +47,7 @@ func NewConventionalCommitsParser() *ConventionalCommitsParser {
|
|||
}
|
||||
}
|
||||
|
||||
func (c *ConventionalCommitsParser) AnalyzeCommits(commits []Commit) ([]AnalyzedCommit, error) {
|
||||
func (c *ConventionalCommitsParser) Analyze(commits []Commit) ([]AnalyzedCommit, error) {
|
||||
analyzedCommits := make([]AnalyzedCommit, 0, len(commits))
|
||||
|
||||
for _, commit := range commits {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue