Documentation ¶
Index ¶
- Variables
- func Age(t *metav1.Time, c clockwork.Clock) string
- func CamelCasit(s string) string
- func CleanKubernetesName(s string) string
- func CleanValueKubernetes(s string) string
- func ConditionEmoji(c knative1.Conditions) string
- func ConditionSad(c knative1.Conditions) string
- func Duration(t1, t2 *metav1.Time) string
- func GetRepoOwnerFromURL(ghURL string) (string, error)
- func GetRepoOwnerSplitted(u string) (string, string, error)
- func PRDuration(runStatus v1alpha1.RepositoryRunStatus) string
- func PipelineRunStatus(pr *tektonv1.PipelineRun) string
- func SanitizeBranch(s string) string
- func ShortSHA(sha string) string
- func ShowLastAge(repository v1alpha1.Repository, cw clockwork.Clock) string
- func ShowLastSHA(repository v1alpha1.Repository) string
- func ShowStatus(repository v1alpha1.Repository, cs *cli.ColorScheme) string
- func Timeout(t *metav1.Duration) string
- func UniqueStringArray(slice []string) []string
- type MessageTemplate
Constants ¶
This section is empty.
Variables ¶
var PipelineRunStatusText string
var QueuingPipelineRunText string
var StartingPipelineRunText string
Functions ¶
func CleanKubernetesName ¶ added in v0.21.5
func CleanValueKubernetes ¶ added in v0.18.0
CleanValueKubernetes conform a string to kubernetes naming convention see https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names rules are: • contain at most 63 characters • contain only lowercase alphanumeric characters or '-' • start with an alphanumeric character • end with an alphanumeric character.
func ConditionEmoji ¶
func ConditionEmoji(c knative1.Conditions) string
func ConditionSad ¶ added in v0.12.0
func ConditionSad(c knative1.Conditions) string
func GetRepoOwnerFromURL ¶
func PRDuration ¶ added in v0.13.0
func PRDuration(runStatus v1alpha1.RepositoryRunStatus) string
PRDuration calculates the duration of a repository run, given its status. It takes a RepositoryRunStatus object as input. It returns a string with the duration of the run, or nonAttributedStr if the run has not started or completed.
func PipelineRunStatus ¶
func PipelineRunStatus(pr *tektonv1.PipelineRun) string
PipelineRunStatus return status of PR success failed or skipped.
func SanitizeBranch ¶
SanitizeBranch remove refs/heads from string, only removing the first prefix in case we have branch that are actually called refs-heads 🙃.
func ShowLastAge ¶
func ShowLastAge(repository v1alpha1.Repository, cw clockwork.Clock) string
func ShowLastSHA ¶
func ShowLastSHA(repository v1alpha1.Repository) string
func ShowStatus ¶
func ShowStatus(repository v1alpha1.Repository, cs *cli.ColorScheme) string
func UniqueStringArray ¶ added in v0.23.0
Types ¶
type MessageTemplate ¶ added in v0.22.0
type MessageTemplate struct { PipelineRunName string Namespace string NamespaceURL string ConsoleName string ConsoleURL string TknBinary string TknBinaryURL string TaskStatus string FailureSnippet string }
func (MessageTemplate) MakeTemplate ¶ added in v0.22.0
func (mt MessageTemplate) MakeTemplate(tmpl string) (string, error)