Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeCommit ¶
MakeCommit adds the changed files and create a new Git commit.
func ReleaseBranchVersion ¶
func ReleaseBranchVersion(v semver.Version) string
ReleaseBranchVersion returns a formatted release branch for a given version.
func ReleaseVersion ¶
func ReleaseVersion(v semver.Version) string
ReleaseVersion returns a formatted release tag for a given version.
Types ¶
type Info ¶
type Info struct { Org string Repo string Head string // PR head branch Base string // PR base branch UserID string // Github User ID of PR creator UserName string // User display name for Git commit Email string // User email address for Git commit }
Info saves information that can be used to interact with GitHub.
func (*Info) GetHeadRef ¶
GetHeadRef returns the HeadRef with the given Git Info. HeadRef is in the form of "user:head", i.e. "github_user:branch_foo"
type RefType ¶
type RefType int
type Repo ¶
Repo is a simplified git remote, containing only the list of tags, default branch and branches.
func (*Repo) BestRefFor ¶
func (r *Repo) BestRefFor(release, moduleRelease semver.Version, ruleset RulesetType) (string, RefType)
BestRefFor Returns module@ref, isRelease based on the provided ruleset for a this release.
type RulesetType ¶
type RulesetType int
RulesetType defines the rules to use for calculating repo.BestRefFor.
const ( // AnyRule - release tag, release branch, or default branch AnyRule RulesetType = iota // ReleaseOrReleaseBranchRule - only release tag or release branch ReleaseOrReleaseBranchRule // ReleaseRule - only release tag ReleaseRule // ReleaseBranchRule - only release branch ReleaseBranchRule // InvalidRule - unable to parse InvalidRule )
func Ruleset ¶
func Ruleset(rule string) RulesetType
Ruleset converts a rule string into a RulesetType.
func (RulesetType) String ¶
func (rt RulesetType) String() string
String returns the string represented by the Ruleset.