Documentation
¶
Overview ¶
Package commit contains code for reading and processing commits.
Index ¶
- Constants
- Variables
- type AnalyzedCommit
- type Analyzer
- func (a *Analyzer) Analyze(ctx context.Context, rc string) ([]*Version, error)
- func (a *Analyzer) AnalyzeScope(ctx context.Context, scope, rc string) (*Version, error)
- func (a *Analyzer) LatestRelease(ctx context.Context, scope, rc string) (semver.Version, error)
- func (a *Analyzer) Match(commit *model.Commit, policies []*config.Policy) (*AnalyzedCommit, error)
- func (a *Analyzer) ReadCommitsSince(ctx context.Context, scope string, latest semver.Version) ([]*model.Commit, error)
- type BodyAnnotation
- type ReleaseType
- type Tag
- func (t *Tag) Execute(w io.Writer, d TagData) error
- func (t *Tag) ExecuteString(d TagData) (string, error)
- func (t *Tag) ExtractSemver(scope, rc, tag string) (semver.Version, error)
- func (t *Tag) Glob(scope, rc string) (string, error)
- func (t *Tag) GlobVersion(scope, rc string, v semver.Version) (string, error)
- func (t *Tag) Prefix(scope string) (string, error)
- func (t *Tag) SemverLatest(tags []string, scope, rc string) (semver.Version, error)
- type TagData
- type Version
Constants ¶
View Source
const DefaultTagTemplate = `{{- with $scope := .Version.Scope -}}
{{- $scope -}}/
{{- end -}}
v{{- semver .Version -}}`
Variables ¶
View Source
var ErrNoPolicy = errors.New("commit: no policy matched")
View Source
var ErrNoTags = errors.New("commit: no release tags found")
Functions ¶
This section is empty.
Types ¶
type AnalyzedCommit ¶
type AnalyzedCommit struct { *model.Commit ReleaseType ReleaseType Scope string CommitType string Policy *config.Policy // Valid, when false, indicates that the commit didn't match any policies, // but there was a fallback. Valid bool Annotations []BodyAnnotation }
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
func (*Analyzer) AnalyzeScope ¶
func (*Analyzer) LatestRelease ¶ added in v0.6.0
type BodyAnnotation ¶
type ReleaseType ¶
type ReleaseType int
const ( ReleaseSkip ReleaseType ReleasePatch ReleaseMinor ReleaseMajor )
func ReleaseTypeFromString ¶
func ReleaseTypeFromString(s string) ReleaseType
func (ReleaseType) String ¶
func (t ReleaseType) String() string
type Tag ¶
type Tag struct {
// contains filtered or unexported fields
}
func (*Tag) ExtractSemver ¶
func (*Tag) GlobVersion ¶
type Version ¶
type Version struct { semver.Version Scope string `json:"scope,omitempty"` AllCommits []*AnalyzedCommit `json:"all_commits"` Commit string `json:"commit"` RC string // contains filtered or unexported fields }
func (*Version) ShortCommit ¶
Click to show internal directories.
Click to hide internal directories.