formatting

package
v0.14.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Age

func Age(t *metav1.Time, c clockwork.Clock) string

func CamelCasit

func CamelCasit(s string) string

CamelCasit pull_request > PullRequest

func ConditionEmoji

func ConditionEmoji(c knative1.Conditions) string

func ConditionSad added in v0.12.0

func ConditionSad(c knative1.Conditions) string

func Duration

func Duration(t1, t2 *metav1.Time) string

func GetRepoOwnerFromURL

func GetRepoOwnerFromURL(ghURL string) (string, error)

func GetRepoOwnerSplitted

func GetRepoOwnerSplitted(u string) (string, string, error)

func K8LabelsCleanup

func K8LabelsCleanup(s string) string

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.

func PRDuration added in v0.13.0

func PRDuration(runStatus v1alpha1.RepositoryRunStatus) string

func PipelineRunStatus

func PipelineRunStatus(pr *tektonv1beta1.PipelineRun) string

PipelineRunStatus return status of PR success failed or skipped

func SanitizeBranch

func SanitizeBranch(s string) string

SanitizeBranch remove refs/heads from string, only removing the first prefix in case we have branch that are actually called refs-heads 🙃

func ShortSHA

func ShortSHA(sha string) string

ShortSHA returns a shortsha

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 Timeout

func Timeout(t *metav1.Duration) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL