Documentation ¶
Index ¶
- func Age(t *metav1.Time, c clockwork.Clock) string
- func CamelCasit(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 K8LabelsCleanup(s string) string
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConditionEmoji ¶
func ConditionEmoji(c knative1.Conditions) string
func ConditionSad ¶ added in v0.12.0
func ConditionSad(c knative1.Conditions) string
func GetRepoOwnerFromURL ¶
func K8LabelsCleanup ¶
K8LabelsCleanup k8s do not like slash in labels value and on push we have the full ref, we replace the "/" by "-". The tools probably need to be aware of it when querying.
valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')
func PRDuration ¶ added in v0.13.0
func PRDuration(runStatus v1alpha1.RepositoryRunStatus) string
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
Types ¶
This section is empty.