formatting

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PipelineRunStatusHTML string
View Source
var PipelineRunStatusMarkDown string
View Source
var QueuingPipelineRunHTML string
View Source
var QueuingPipelineRunMarkdown string
View Source
var StartingPipelineRunHTML string
View Source
var StartingPipelineRunMarkdown string

Functions

func Age

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

func CamelCasit

func CamelCasit(s string) string

CamelCasit pull_request > PullRequest.

func CleanKubernetesName added in v0.21.5

func CleanKubernetesName(s string) string

func CleanValueKubernetes added in v0.18.0

func CleanValueKubernetes(s string) string

CleanValueKubernetes conforms a string to kubernetes naming convention see https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set. Valid label value: * must be 63 characters or less (can be empty), * unless empty, must begin and end with an alphanumeric character ([a-z0-9A-Z]), * could contain dashes (-), underscores (_), dots (.), and alphanumerics between.

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 PRDuration added in v0.13.0

func PRDuration(startTime, completionTime *metav1.Time) string

func PipelineRunStatus

func PipelineRunStatus(pr *tektonv1.PipelineRun) status.Conclusion

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 Timeout

func Timeout(t *metav1.Duration) string

func UniqueStringArray added in v0.23.0

func UniqueStringArray(slice []string) []string

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)

Jump to

Keyboard shortcuts

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