Documentation ¶
Index ¶
- Variables
- type CommitMsg
- type Detector
- func (d *Detector) Check() (info *Information, err error)
- func (d *Detector) CommitCheck(_ *Information) (c CommitMsg)
- func (d *Detector) FileCheck(_ *Information) (files Files, err error)
- func (d *Detector) HelmCheck(changes *Information) (c HelmChange)
- func (d *Detector) KaeterCheck(changes *Information) (kc KaeterChange, err error)
- func (d *Detector) PullRequestCommitCheck(_ *Information) (pr *PullRequest)
- type Files
- type HelmChange
- type Information
- type KaeterChange
- type PullRequest
Constants ¶
This section is empty.
Variables ¶
var LabelCharacters = "a-zA-Z0-9-_"
LabelCharacters is the list of valid character for a Bazel package
var PackageLabelRegex = regexp.MustCompile(fmt.Sprintf(":[%s]+", LabelCharacters))
PackageLabelRegex the regex to find labels of the current package
var RepoLabelRegex = regexp.MustCompile(fmt.Sprintf("//([%s]+/)*[%s]+(:[%s]+){0,1}", LabelCharacters, LabelCharacters, LabelCharacters))
RepoLabelRegex the regex to find labels of the current repository
Functions ¶
This section is empty.
Types ¶
type CommitMsg ¶
type CommitMsg struct { Tags []string ReleasePlan *actions.ReleasePlan `json:",omitempty"` }
CommitMsg contains the list of commit message tags
type Detector ¶
type Detector struct { RootPath string PreviousCommit string CurrentCommit string KaeterModules []modules.KaeterModule PullRequest *PullRequest }
Detector contains the configuration of the change detector
func (*Detector) Check ¶
func (d *Detector) Check() (info *Information, err error)
Check performs the change detection over all modules
func (*Detector) CommitCheck ¶
func (d *Detector) CommitCheck(_ *Information) (c CommitMsg)
CommitCheck returns information about the current commit message (current as defined by the parameters, not necessarily HEAD). This includes the first 3 [tags] in the subject line, the release plan if one is available.
func (*Detector) FileCheck ¶
func (d *Detector) FileCheck(_ *Information) (files Files, err error)
FileCheck reads the git changes between two commit and compiles a list of added, changed and deleted files
func (*Detector) HelmCheck ¶
func (d *Detector) HelmCheck(changes *Information) (c HelmChange)
HelmCheck performs change detection on Helm chart and returns the summary in HelmChange
func (*Detector) KaeterCheck ¶
func (d *Detector) KaeterCheck(changes *Information) (kc KaeterChange, err error)
KaeterCheck attempts to find all Kaeter modules and infers based on the change set which module were altered
func (*Detector) PullRequestCommitCheck ¶
func (d *Detector) PullRequestCommitCheck(_ *Information) (pr *PullRequest)
PullRequestCommitCheck allows checking for a release to be from a pull request assuming: - The PR has a title and body - The title and body combined will beocome the merged commit message This in turns allows loading kaeter release plans on what is to be released.
type HelmChange ¶
type HelmChange struct {
Charts []string
}
HelmChange contains the list of modified Helm charts
type Information ¶
type Information struct { Files Files Commit CommitMsg Kaeter KaeterChange Helm HelmChange PullRequest *PullRequest `json:",omitempty"` }
Information contains the summary of all changes
func LoadChangeset ¶
func LoadChangeset(changesetPath string) (info *Information, err error)
LoadChangeset reads changeset.json back into Information.
type KaeterChange ¶
type KaeterChange struct {
Modules map[string]modules.KaeterModule
}
KaeterChange contains a map of changed Modules by ids
type PullRequest ¶
type PullRequest struct { Title string `json:"title,omitempty"` Body string `json:"body,omitempty"` ReleasePlan *actions.ReleasePlan `json:",omitempty"` }
PullRequest can hold optional informations if a pull request is open on the vcs hosting platform