Documentation
¶
Index ¶
- func BuildCommitMessage() (message string)
- func BuildTrailers() (trailers []string)
- func GetCliAuthToken() string
- func GithubActionsBranch() (branch string)
- func IsBinaryInPath(name string) bool
- func IsCommitHash(ref string) bool
- func IsValidRefName(refName string) error
- func MapValues[T any](m map[string]T) []T
- func PrettyJson(r any) string
- func QualifiedRefName(refName string, refType string) (string, error)
- func ShortJson(r any) string
- func SliceChain[T any](slices ...[]T) iter.Seq[T]
- type RepositoryContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCommitMessage ¶ added in v0.3.0
func BuildCommitMessage() (message string)
BuildCommitMessage generates a commit message from the message and trailers configuration
func BuildTrailers ¶ added in v0.9.1
func BuildTrailers() (trailers []string)
BuildTrailers generates the complete list of trailers from the configuration
func GetCliAuthToken ¶ added in v0.13.0
func GetCliAuthToken() string
GetCliAuthToken tries to get a GitHub token by execing `gh auth token`
func GithubActionsBranch ¶ added in v0.9.1
func GithubActionsBranch() (branch string)
GithubActionsBranch returns the branch name if running in a GitHub Actions environment, or an empty string
func IsBinaryInPath ¶ added in v0.13.0
IsBinaryInPath checks if a given binary is available in the PATH
func IsCommitHash ¶ added in v0.9.1
IsCommitHash returns true if the ref looks like a commit hash
func IsValidRefName ¶ added in v0.9.1
IsValidRefName checks if the ref name matches git ref requirements
func PrettyJson ¶ added in v0.13.0
func QualifiedRefName ¶ added in v0.13.0
QualifiedRefName normalizes the ref name to a fully qualified format
func SliceChain ¶ added in v0.13.0
Types ¶
type RepositoryContext ¶ added in v0.9.1
func GithubActionsContext ¶ added in v0.9.1
func GithubActionsContext() *RepositoryContext
GithubActionsContext returns repository context if running in a GitHub Actions environment