Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequireCommitOnMain ¶
func RequireCommitOnMain(commit string)
Types ¶
type GitLog ¶
type GitLog struct {
// Abbreviated commit hash.
Commit string
// Commit subject.
Subject string
// Associated branch name. Branch might not exist.
Branch string
}
Returned by some of the Get*Commit functions.
func GetAllCommits ¶
func GetAllCommits() []GitLog
Returns all the commits on the current branch. For use by tests.
func GetBranchInfo ¶
func GetBranchInfo(commitIndicator string, indicatorType IndicatorType) GitLog
Returns BranchInfo for commitIndicator and indicatorType.
func GetNewCommits ¶
type IndicatorType ¶
type IndicatorType string
Enum for what commitIndicator represents.
const ( // commitIndicator is a commit hash. IndicatorTypeCommit IndicatorType = "commit" // commitIndicator is a PR number. IndicatorTypePr IndicatorType = "pr" // commitIndicator is a list index from log (1 based). IndicatorTypeList IndicatorType = "list" // Guess based on length of commitIndicator and whether it is all numeric. IndicatorTypeGuess IndicatorType = "guess" )
func (IndicatorType) IsValid ¶
func (indicator IndicatorType) IsValid() bool
Returns weather the indicator type is of a known type.
type PullRequestText ¶
func GetPullRequestText ¶
func GetPullRequestText(commitHash string, featureFlag string) PullRequestText
Click to show internal directories.
Click to hide internal directories.